tholzer <thol...@wetafx.co.nz> added the comment: This is not quite correct:
The following 2 lines fail as expected (unbuffered): <pre> python -u -c 'import sys; print >> sys.stdout, "x"' 1>&- ; echo $? python -u -c 'import sys; print >> sys.stderr, "x"' 2>&- ; echo $? </pre> whereas in the following example, the first command succeeds and the second one fails: <pre> python -c 'import sys; print >> sys.stdout, "x"' 1>&- ; echo $? python -c 'import sys; print >> sys.stderr, "x"' 2>&- ; echo $? </pre> This is counter-intuitive and somewhat contradicts the documentation, as stderr always seems to be unbuffered (irrespective of the -u option). IMHO, they should either both fail or both succeed. They seem to behave the same in 2.5 & 2.6, however in 3.1, they all die with a SIGABRT, which I guess could be questioned as well. IMHO, they should just throw an exception like in 2.6. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7932> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com