throbber not working during sleep

Jeff Peery wrote:

Hello,

I’m trying to post a waiting message with a throbber while I’m loading some data in my wxApp. I call time.sleep() during the data loading process and this seems to stop the throbber. I can’t load my data in a thread (I’m creating an OPC client using COM and this doesn’t work well under a multi threaded application). Is there a way to make my throbber work and also be able to call time.sleep?

If you block the gui thread (IOW, don't return as soon as possible to the MainLoop) then there is no way that additional events (like updating the throbber) can can be sent and processed, until you stop blocking them.

http://wiki.wxpython.org/LongRunningTasks

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!