sleep function
SWT
dumplechan at hotmail.com
Tue Aug 29 22:07:34 EDT 2000
javanet at dynacap.com (Arnaldo Riquelme) spake thusly <sqop68p4c5d41
@corp.supernews.com>:
>Does python has a function similar to sleep() in perl?
>If so what is it? How do I make a function to execute every (5,15,10)
>minutes ?
You can make Python execution pause by using the sleep() function in the
time module:
import time
[...snip...]
# And now, five minutes of silence...
time.sleep(300)
[...snip...]
If you're using Tkinter, you can use root.after(<n>,<func>) to make the
function <func> run after <n> milliseconds. This only makes the function
get called once; to make it get called again, make another call to
root.after() inside <func>.
--
SWT (dumplechan at hotmail.com)
ark media dumping ground -=-> ftp://gianth.com
I don't know, but I've been told
Deidre's got a Network Node
More information about the Python-list
mailing list