[wxPython] Sleep

Hello
    I'm trying to test some functions out. Now lets say i change some the value in some text controls, i want the text to appear, and then i want to sleep for 2 seconds. I have just tried putting a time.sleep(2) in after the last function call but the
window does not get refreshed until after the sleep. Just wondering what the best possible way to go about this would be. Just want to delay things from happening to look like a real situation. Thanks for your help

Christopher Regan

You could try wxSleep so pending events will get dispatched. Or just use a wxTimer and do your update in the timeout handler.

···

christopher.j.regan@philips.com wrote:

Hello
    I'm trying to test some functions out. Now lets say i change some the value in some text controls, i want the text to appear, and then i want to sleep for 2 seconds. I have just tried putting a time.sleep(2) in after the last function call but the
window does not get refreshed until after the sleep. Just wondering what the best possible way to go about this would be. Just want to delay things from happening to look like a real situation. Thanks for your help

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