wxPython blocks in thread?
Cliff Wells
logiplexsoftware at earthlink.net
Wed Feb 27 14:37:20 EST 2002
On 27 Feb 2002 19:08:44 +0100
Arnaud de La Fortelle wrote:
>
> I am a beginner with wxPython and tried to embed a GUI within a
> thread. So I came with a simple implementation, but it does not work.
> I do not understand why the following application blocks. What the
> matter?
> import threading
> class GUIThread(threading.Thread,object):
> def __init__(self):
> threading.Thread.__init__(self,target=self.loop)
> self.start()
> def loop(self):
> print gui_thr
> self.app = MyApp(0)
> self.app.MainLoop() # if I comment out this line, it works
> print "Ending wxLoop", self.isAlive()
wxApp.MainLoop() doesn't return until the last wxWindow is destroyed.
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308 (800) 735-0555 x308
More information about the Python-list
mailing list