do something every n seconds

Steve Holden steve at
Thu Nov 25 16:05:49 CET 2010

On 11/25/2010 6:38 AM, Santiago Caracol wrote:
> Hello,
> how can I do something (e.g. check if new files are in the working
> directory) every n seconds in Python?
Look at the sched library, which was written to take care of
requirements like this. Use time.sleep() as your delay function and
time.time() as your time function.

Steve Holden           +1 571 484 6266   +1 800 494 3119
PyCon 2011 Atlanta March 9-17
See Python Video!
Holden Web LLC       

More information about the Python-list mailing list