[issue7932] print statement delayed IOError when stdout has been closed

2021-11-26 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11: cpython % ./python.exe -c 'import sys; print("x", file=sys.stdout)' 1>&- ; echo $? 0 cpython % ./python.exe -c 'import sys; print("x", file=sys.stderr)' 2>&- ; echo $? x 0 -- nosy: +iritkatriel versions: +Python 3.11 -Python 3.5

[issue7932] print statement delayed IOError when stdout has been closed

2019-03-15 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-22 Thread Eugene Tang
Eugene Tang added the comment: A similar problem seems to appear in Python 3.5 ./python -c 'import sys; print(x, file=sys.stdout)' 1- ; echo $? 0 ./python -c 'import sys; print(x, file=sys.stderr)' 2- ; echo $? x 0 but again, this does seem to be a very specific corner case. --

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: I have no interest to work on this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7932 ___ ___

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-22 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- nosy: -loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7932 ___ ___ Python-bugs-list

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-08 Thread tholzer
tholzer added the comment: It's still a problem in Python 2.7: python -c 'import sys; print sys.stdout, x' 1- ; echo $? close failed in file object destructor: sys.excepthook is missing lost sys.stderr 0 But feel free to close as won't fix, as this seems to be an edge case which might not be

[issue7932] print statement delayed IOError when stdout has been closed

2014-06-06 Thread Mark Lawrence
Mark Lawrence added the comment: Is there any interest in following this up as 2.6 is out of support? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7932 ___

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-15 Thread tholzer
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,

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-14 Thread tholzer
New submission from tholzer thol...@wetafx.co.nz: When printing to a closed stdout file descriptor, the print statement only raises an IOError at character 8192. The expected behaviour is that IOError gets raised immediately (i.e. on the first character). Compare this behaviour to writing to

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-14 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is not a bug. The output stream gets buffered, and that it is closed is only detected when a flush is attempted. Use the -u option if you want unbuffered stdout. It is, however, a bug that Python 2.6 apparently fails to flush the