print before sleep in python

Avik Ghose avik at rebaca.com
Tue Dec 23 01:55:11 EST 2003


Hi All,
What I am trying to acheive is very simple. I want to print something
to the screen(sys.stdout) and then go to sleep (time.sleep) for a some
duration. Now, I want the thread to print the message first and then
go to sleep. But what actually happens is that it prints after coming
back to ready state. I have tried to flush the stdout
(sys.stdout.flush) but it did not work. I hope many of you will be
able to help me out. Thanks a lot in advance.
Regards,
Avik




More information about the Python-list mailing list