[Tutor] wait() or other pause functions, if any?
Bryce Embry
bryce@bembry.org
Thu, 23 May 2002 10:16:10 -0500
Try the sleep() function in the time module
from time import sleep
sleep(0.5)
The number in the parentheses is how many seconds you want the program to
pause. I'm not familiar with wait() but it sounds like sleep() will fit
your needs.
Bryce
At 10:07 AM 5/23/2002, you 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
Bryce Embry
Geek-Of-All-Trades / Master-Of-None
www.bembry.org
--------------------------------------------------------------------------------------------------------------------------------------------------------
Technology Coordinator for MHA/FYOS ^ 390 South White Station ^ Memphis, TN
38117 ^ (901)682-2409
--------------------------------------------------------------------------------------------------------------------------------------------------------
Bryce Embry
Geek-Of-All-Trades / Master-Of-None
www.bembry.org
--------------------------------------------------------------------------------------------------------------------------------------------------------
Technology Coordinator for MHA/FYOS ^ 390 South White Station ^ Memphis, TN
38117 ^ (901)682-2409
--------------------------------------------------------------------------------------------------------------------------------------------------------