wxPython before MainLoop
7stud
bbxx789_05ss at yahoo.com
Thu Aug 9 05:16:52 EDT 2007
I reorganized my Thread class a little bit:
------------
class MyThread(threading.Thread):
def __init__(self, a_frame):
threading.Thread.__init__(self)
self.frame_obj = a_frame
def run(self):
result = self.long_slow_init()
wx.CallAfter(self.frame_obj.receive_result, result)
#CallAfter() calls the specified function with the specified
argument
#when the next pause in execution occurs in this thread.
def long_slow_init(self):
print "starting long_slow_init()..."
time.sleep(6)
result = 20.5
return result
--------------
More information about the Python-list
mailing list