stdout and stderr showing output only after script is done

MKoool mohan at terabolic.com
Sun May 29 20:20:33 EDT 2005


I just installed python 2.4 for windows.  I was using the cygwin
version previously, but wanted to use the official python 2.4 release
to install a module that reads off some registry entries.

After installing, I did what I normally do, ssh to my local windows
machine, and run the python script I wrote.  The script takes about 30
seconds to complete and gives me incremental output.  I ran it, and it
seems to be buffering standard input and  output.  It ran my whole
script and showed me all the output of stderr and stdout only after the
whole script was done.  For example, my script can sometimes take like
10 minutes to finish, so I print out "1% complete", "2% complete" and
so on.  Now it shows me nothing, and at the end, it just tells me "1%
complete, 2% complete... 100% complete" all in one shot.

Can I change this behavior somehow?

thanks,
mohan




More information about the Python-list mailing list