[Tutor] Timers in Python

Rob Andrews rob.andrews at gmail.com
Thu Oct 4 10:41:21 CEST 2007

On 10/4/07, Kamal <poolmasterji at yahoo.com> wrote:
> Is there a method in Python which does what
> setInterval('someFunction()',5000) does in Javascript.
> Basically, I want to call functionOne() every x minutes, and wondering
> whats the best way to do it.

Yes, the time module in the standard library has sleep(x), where x is
in seconds.

The Python Library Reference, section 14.2, goes into a bit more detail.

-Rob A.

More information about the Tutor mailing list