Simple wxPython Application
gustav at morpheus.demon.co.uk
Sat Apr 19 15:39:44 CEST 2003
ekranawetter at bmw.co.at (ekranawetter_steyr) writes:
> from wxPython.wx import wxPySimpleApp, wxFrame
> app = wxPySimpleApp()
> frame = wxFrame(None, -1, "Hello World")
> I got a syntax error in line 2
If you typed it exactly like this, you'll get an error "SyntaxError:
invalid syntax", which admittedly is not very helpful. The problem is
the indentation. Indentation in Python is significant, and indicates
block structure. The first line (from...import) does not start a
block, so indenting the next line is wrong.
Sorry, I can't help with your second problem.
This signature intentionally left blank
More information about the Python-list