[Tutor] Re: Tutor digest, Vol 1 #466 - 7 msgs

David Porter jcm@bigskytel.com
Wed, 8 Nov 2000 18:42:05 -0700


* Jerry Killion <jkillion@mipscorp.com>:

> I ran the sleep method under pythonwin 1.5 and it doesn't act like what i
> would expect - the sleep method seems to run prior to printing - can you
> explain why?

I don't understand your question. time.sleep() will run prior to what is
after it and after what it before it.

import time
print 'before'
time.sleep(3)
print 'after'

If this code is executed, there will be a 3 second pause between the
printing of 'before' and 'after'. The pause occurs because we requested a 3
second pause in the execution of the script before proceeding to the next
line. 

> 
> thanks
> 

Please do not quote the entire digest. Most (all?) of it had nothing to do
with your question.

David