Mailing List Archive

sleep()ing
is there anyway to sleep in a python program asside from:
import os
os.system("sleep 1")

or

import threading
threading._sleep(1)

I mean it is part of unistd.h so you would think that it would
appear in os or posix or somewhere.

cheers, Angus.
sleep()ing [ In reply to ]
Angus MacKay writes:

> is there anyway to sleep in a python program asside from:
> import os
> os.system("sleep 1")
>
> or
>
> import threading
> threading._sleep(1)
>
> I mean it is part of unistd.h so you would think that it would
> appear in os or posix or somewhere.

Would time.sleep do? (There is a low level index to the library docs,
you know).

- Gordon
sleep()ing [ In reply to ]
It's in time.

import time
time.sleep(1)



Angus MacKay wrote:

> is there anyway to sleep in a python program asside from:
> import os
> os.system("sleep 1")
>
> or
>
> import threading
> threading._sleep(1)
>
> I mean it is part of unistd.h so you would think that it would
> appear in os or posix or somewhere.
>
> cheers, Angus.