Re: Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2013-11-11 Thread swatkins
It's surprising and broken that stderr should be buffered in python3. python3 calls setvbuf(3) on stderr at startup to achieve this chuckle-headed behavior. It makes stderr line buffered if on a terminal, and fully buffered if redirected to a log file. A fully buffered stderr is a very bad

Re: Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2013-11-11 Thread swatkins
sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0) which unfortunately doesn't work! I guess will resort to python3 -u, although I don't want stdout to be unbuffered. -- https://mail.python.org/mailman/listinfo/python-list

Re: Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2011-12-10 Thread Geoff Bache
Hi Terry, The difference from 2.x should be in What's New in 3.0, except that the new i/o module is in 2.6, so it was not exactly new. The io module existed in 2.6, but it was not used by default for standard output and standard error. The only mention of this in What's New in 3.0 is in the

Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2011-12-09 Thread Geoff Bache
Hi all, Short version: I'm a bit confused in general as to the changes between python2 and python3 regarding how standard output and standard error do buffering. A few things seem to have changed and I've failed to find any documentation of how and why. Also, the meaning of python -u seems to

Re: Buffering of sys.stdout and sys.stderr in python3 (and documentation)

2011-12-09 Thread Terry Reedy
On 12/9/2011 2:32 PM, Geoff Bache wrote: Hi all, Short version: I'm a bit confused in general as to the changes between python2 and python3 regarding how standard output and standard error do buffering. A few things seem to have changed and I've failed to find any documentation of how and why.