[Tutor] wait() or other pause functions, if any?

Rob Andrews rob@uselesspython.com
Thu, 23 May 2002 10:20:08 -0500

This may not be what you're looking for, but the time.sleep is handy for 
a good many things. Here's an example:

# sleeptest.py
import time

def sleeptest():
     print 'I have slept'

if __name__ == '__main__':


Terje Johan Abrahamsen wrote:

> I would like my program to pause between the running of two functions. Eg:
> function1()
> wait 2 seconds
> function2()
> This because the functions run other programs, and Python are way faster 
> than the other programs, so I must get them to catch up. I found the 
> function wait() at page: 
> http://www.python.org/dev/doc/devel/lib/condition-objects.html. So I 
> tried wait(2), but get an error that the name wait is not defined. Do I 
> have to import some module with wait? If so which? I don't understand 
> what they mean on the webpage. Where can I find such info? I looked in 
> the Python reference, but that didn't mention the wait function.
> Thanks in advance,
> Terje
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor