Simple wxPython Application

Paul Moore gustav at
Sat Apr 19 15:39:44 CEST 2003

ekranawetter at (ekranawetter_steyr) writes:

> from wxPython.wx import wxPySimpleApp, wxFrame
>   app = wxPySimpleApp()
>   frame = wxFrame(None, -1, "Hello World")
>   frame.Show(1)
>   app.MainLoop()
> 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 mailing list