Skip to content

Instantly share code, notes, and snippets.

@supercheetah
Created November 27, 2012 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supercheetah/4157249 to your computer and use it in GitHub Desktop.
Save supercheetah/4157249 to your computer and use it in GitHub Desktop.
Using native Python logging seems to cause Kivy to go into an infinite loop
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
import logging
class MyPaintWidget(FloatLayout):
def on_touch_down(self, touch):
# if this is called, this will not exit on close, but instead
# seem to get stuck in an infinite loop somewhere
logging.info("informational log stuff")
print touch
class MyPaintApp(App):
def build(self):
m = MyPaintWidget()
m.add_widget(Label(text="Click me, I dare you.", size_hint=(None,None), pos_hint={'center_x': .5, 'y': .5}))
return m
if __name__ == '__main__':
MyPaintApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment