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

Pijus Virketis virketis@fas.harvard.edu
Thu, 23 May 2002 11:30:27 -0400


<HTML><HEAD>
<BASEFONT FACE=3D"Arial" SIZE=3D"2" COLOR=3D"#000000">
</HEAD>
<BODY>
<div>Dear Terje, <br></div>
<div>&nbsp;</div>
<div>The function that I usually see used in situations such as=
 you suggest is sleep(), which is in the time module. I have also=
 found a wait() function in the Python posix module (<a=
 href=3D"http://www.informatik.hu-berlin.de/Themen/manuals/python/p=
ython-texinfo/posix.html">http://www.informatik.hu-berlin.de/Them=
en/manuals/python/python-texinfo/posix.html</a>). This will use=
 the underlying OS tools to do the trick, if I understand=
 correctly. You can't even really import it, but must use the os=
 module instead to gain access to it. (<a=
 href=3D"http://www.python.org/doc/current/lib/module-posix.html">h=
ttp://www.python.org/doc/current/lib/module-posix.html</a>) posix=
 claims not to work on Macs, and on Windows the wait() function=
 does not exist, so maybe the time.sleep() is the portable way to=
 go ...<br></div>
<div>&nbsp;</div>
<div>Cheers, <br></div>
<div>&nbsp;</div>
<div>Pijus<br></div>
<div>&nbsp;</div>
<div>-- <br></div>
<div>&quot;Those who can make you believe absurdities<br></div>
<div>can make you commit atrocities&quot; - Voltaire<br></div>
</body></html>