donn at u.washington.edu
Thu Mar 29 18:39:54 CEST 2001
Quoth wcuddy at lserv.ja10629.home (Wayne Cuddy):
| I need to print a period on an xterm every few seconds to provide status to the
| user, I don't want to force a newline. How do I turn off line buffering for
| standard out?
I don't know, but you don't need that anyway - if you don't want buffered
output then don't use an output buffer like stdout!
You can write directly to standard output like this:
Unit 1 is by definition standard output; 2 is error and 0 is input.
File objects stdout, stderr and stdin use these same file descriptors
eventually, via C library stdio functions, so when you write directly
to them you just omit a lot of extra stuff you don't want.
If you really want a file object for some reason, stderr normally will
Donn Cave, donn at u.washington.edu
More information about the Python-list