Run Python script in command line
Reid Lai
reidlai at reidlai.com
Thu Dec 12 10:59:08 EST 2002
Dear All,
I am newbie of Python and have installed Python 2.2 and wxPython. When
I run "python.exe test.py", an error about MainLoop is not an attribute
of "NoneType". While running "pythonw.exe test.py", nothing comes up.
Everything works fine under pyShell. Is there any idea?
My test.py is as follow:
import os, sys
from wxPython.wx import *
def MyApp(wxApp):
def OnInit(self):
mainWindow = wxFrame(NULL, -1, "Testing")
mainWindow.Show(true)
self.setTopWindow(mainWindow)
return true
app = MyApp(0)
app.MainLoop()
Regards,
Reid Lai
More information about the Python-list
mailing list