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
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to