469,903 Members | 1,667 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

stdout and stderr showing output only after script is done

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

Jul 19 '05 #1
2 1219
sorry, i'm an idoit who just found that i should use the -u option, my
bad

Jul 19 '05 #2
sorry i meant i installed python version 2.4.1, thanks

MKoool wrote:
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


Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Phil Powell | last post: by
8 posts views Thread by Terry Gray | last post: by
reply views Thread by Christoph Haas | last post: by
5 posts views Thread by Wesley Henwood | last post: by
1 post views Thread by =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.