Why won't wxpython let me run the wx app in a thread? -


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 works fine (with m3gui throw @ - i've tried range of simple frames etc).

but on closing wx app (using window close icon) "assert "wismainthread()" failed:

this error dialog

why this? can avoid it?

i trying use wx set gui python based app

there few pages on wiki, think following explaining need do:

http://wiki.wxpython.org/mainloopasthread


Comments