Reputation: 14685
I have this:
def AppThread():
app = wx.App(False)
frame = M3GUI()
frame.Show()
app.MainLoop()
t = threading.Thread(target=AppThread, args=[])
t.start()
print "started"
It actually works fine (with any M3GUI I throw at it - I've tried a range of simple frames etc).
But on closing the wx app (using the window close icon) I get "assert "wIsMainThread()" failed:
Why is this? Can I avoid it?
I am trying to use WX to set up a GUI for another python based app
Upvotes: 0
Views: 134
Reputation: 2096
There are a few pages on the wiki, I think the following is explaining what you need to do:
http://wiki.wxpython.org/MainLoopAsThread
Upvotes: 2