Created
November 27, 2012 21:37
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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