Simple wxPython Application

Riccardo Galli riccardo_togli_questo at _e_questo_sideralis.net
Sat Apr 19 09:32:55 EDT 2003


On Sat, 19 Apr 2003 04:55:41 -0700, ekranawetter_steyr wrote:

> Hi all,
> 
> 1.Problem
> ---------
> 
> I was not able to run this simple example from the tutorial:
> 
> 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
...
> Thanks, Erwin

Indentation is not correct.
Delete first spaces from every line, like this:

from wxPython.wx import wxPySimpleApp, wxFrame
app = wxPySimpleApp()
frame = wxFrame(None, -1, "Hello World")
frame.Show(1)
app.MainLoop()

It works.

Ciao,
Riccardo

-- 
-=Riccardo Galli=-

 _,e.
s~  ``
 ~@.   ideralis Programs
.   ol 
 `**~  http://www.sideralis.net




More information about the Python-list mailing list