On 2006-05-09, Petr Jakes <[EMAIL PROTECTED]> wrote: > I would like to do "some action" once a minute.
You can try the sched module (import sched). You give it a time at which to call a callback. Then in the callback you can reset the "alarm" for a minute later, using enterabs. If the task might take longer than a minute, it just means you'll be setting an alarm for a time in the past, but it should still get called. But there is another problem, which is that the queue will presumably get very big over time, so you'll need to clear it out now and again with empty()... which means keeping track of the event objects yourself, which is annoying. -- http://mail.python.org/mailman/listinfo/python-list