Ich wollte mir wxPython anschauen und wollte dafür das wxPython - Tutorial auf der Seite Zetcode (http://www.zetcode.com/wxpython/firststeps/) durchgehen. Jetzt wollte ich folgenden Code (bei First steps) selbst auspropieren:
Code: Alles auswählen
#!/usr/bin/python
# simple.py
import wx
app = wx.App()
frame = wx.Frame(None, -1, 'simple.py')
frame.Show()
app.MainLoop()
Code: Alles auswählen
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 309, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File "C:\Python25\Lib\site-packages\Pythonwin\pywin\debugger\__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File "C:\Python25\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 624, in run
exec cmd in globals, locals
File "C:\Dokumente und Einstellungen\Christian\Eigene Dateien\WxPython\simple.py", line 9, in <module>
frame = wx.Frame(None, -1, 'simple.py')
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 505, in __init__
_windows_.Frame_swiginit(self,_windows_.new_Frame(*args, **kwargs))
PyNoAppError: The wx.App object must be created first!