[Pythonmac-SIG] wx Window Flashes and Closes Immediately
Bryan Smith
bryanabsmith at gmail.com
Mon Feb 2 05:42:59 CET 2009
Hi Everyone,
I am trying out a simple wx program from a book and anytime I try and run
the code, the wxFrame flashes open and closes immediately. This is
frustrating as the code is essentially the same as in the book. Here is the
code for your viewing pleasure:
import wx
class wxTest():
def __init__(self):
mainApp = wx.App()
mainFrame = wx.Frame(None)
mainButton = wx.Button(mainFrame)
mainFrame.show()
mainApp.MainLoop()
if __name__ == "__main__":
w = wxTest()
What am I missing here? BTW, I have tried this with python 2.5 (with default
wx) and python 2.6 (wx version 2.8.9.1) and no dice.
Thanks in advance.
Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20090201/97160bd9/attachment.htm>
More information about the Pythonmac-SIG
mailing list