X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95bfd958bda8955ac81277c78e5627c926154f39..66394199cf03f0e9a3a675fe9829d31463ad38bb:/wxPython/demo/Threads.py?ds=sidebyside diff --git a/wxPython/demo/Threads.py b/wxPython/demo/Threads.py index 7f66ee85fd..49654f96a7 100644 --- a/wxPython/demo/Threads.py +++ b/wxPython/demo/Threads.py @@ -33,9 +33,8 @@ class CalcBarThread: def Run(self): while self.keepGoing: evt = UpdateBarEvent(barNum = self.barNum, value = int(self.val)) - wx.PostEvent(self.win.GetEventHandler(), evt) - #del evt - + wx.PostEvent(self.win, evt) + sleeptime = (random.random() * 2) + 0.5 time.sleep(sleeptime/4) @@ -251,5 +250,5 @@ thread. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])