Re: re : do something in time interval

2008-10-09 Thread Hendrik van Rooyen
Lawrence D'Oliveiro wrote: Hendrik van Rooyen wrote: import time while True: end_time = time.time() + 5 while time.time() end_time: do_the_in_between_stuff() do_the_every_five_second_stuff() Maybe I'm dense, but ... where do you stop the

Re: re : do something in time interval

2008-10-08 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Hendrik van Rooyen wrote: import time while True: end_time = time.time() + 5 while time.time() end_time: do_the_in_between_stuff() do_the_every_five_second_stuff() Maybe I'm dense, but ... where do you stop the

re : do something in time interval

2008-10-07 Thread Hendrik van Rooyen
Petr Jakeš [EMAIL PROTECTED] wrote: Leon Zhang [EMAIL PROTECTED] wrote: I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Thanks for your reply. During the 5s period my script has to do some

Re: do something in time interval

2008-10-06 Thread Leon Zhang
Petr, I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Good luck! Leon On Tue, Oct 7, 2008 at 2:07 AM, Petr Jakes [EMAIL PROTECTED] wrote: I have infinitive loop running script and I would like to

Re: do something in time interval

2008-10-06 Thread Terry Reedy
Petr Jakes wrote: I have infinitive loop running script and I would like to check something periodically after 5 seconds (minutes, hours...) time period (I do not mean time.sleep(5) ). Till now, I have following script, but I think there must be something more elegant. eventFlag = False while

Re: do something in time interval

2008-10-06 Thread Jerry Hill
On Mon, Oct 6, 2008 at 2:07 PM, Petr Jakes [EMAIL PROTECTED] wrote: I have infinitive loop running script and I would like to check something periodically after 5 seconds (minutes, hours...) time period (I do not mean time.sleep(5) ). Till now, I have following script, but I think there must

Re: do something in time interval

2008-10-06 Thread Petr Jakeš
I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Thanks for your reply. During the 5s period my script has to do some stuff instead of sleeping. Thats why it runs in the loop and once in 5s period

Re: do something in time interval

2008-10-06 Thread D'Arcy J.M. Cain
On Mon, 6 Oct 2008 21:13:21 +0200 Petr Jake? [EMAIL PROTECTED] wrote: I am not an expert, but why not to use time.sleep(5)? During the 5s period my script has to do some stuff instead of sleeping. Thats why it runs in the loop and once in 5s period it has to trigger some other

Re: do something in time interval

2008-10-06 Thread Mathieu Prevot
2008/10/6 Petr Jakeš [EMAIL PROTECTED]: I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Thanks for your reply. During the 5s period my script has to do some stuff instead of sleeping. Thats why