Re: Beginner question - class definition error

2015-01-28 Thread Cousin Stanley
> from kivy.app import App > from kivy.uix.label import Label > > class MyApp(App): > def build(self): > return Label(text='Hello World') > > if __name__ == '__main__': > MyApp().run() > > > > I get this error when I run it: > > > Traceback (most recent call last): > File

RE: Beginner question - class definition error

2015-01-28 Thread David Aldrich
> Unindent the 'if' statement. Currently, it's indented inside the class > definition, so MyApp isn't defined yet. Thanks very much. That fixed it. Best regards David -- https://mail.python.org/mailman/listinfo/python-list

Re: Beginner question - class definition error

2015-01-28 Thread MRAB
On 2015-01-28 11:10, David Aldrich wrote: Hi I am just getting started with Python 3.3.3 and Kivy 1.8. I am using the Kivy development environment on Windows (open a command prompt and call kivy.bat). With this minimal code: import kivy kivy.require('1.8.0') from kivy.app import App from k

Beginner question - class definition error

2015-01-28 Thread David Aldrich
Hi I am just getting started with Python 3.3.3 and Kivy 1.8. I am using the Kivy development environment on Windows (open a command prompt and call kivy.bat). With this minimal code: import kivy kivy.require('1.8.0') from kivy.app import App from kivy.uix.label import Label class MyApp(App)