[issue1596] Broken pipes should be handled better in 2.x
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1596 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1596] Broken pipes should be handled better in 2.x
Changes by Matteo Bertini matt...@naufraghi.net: -- nosy: +naufraghi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1596 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1596] Broken pipes should be handled better in 2.x
Changes by Sean Reifschneider [EMAIL PROTECTED]: -- priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1596 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1596] Broken pipes should be handled better in 2.x
New submission from Alexandre Vassalotti: I think Python 2.x should mimic, or improve on, the behavior of Py3k for handling broken pipes. That is: 1. Don't print the message close failed: [Errno 32] Broken pipe, from filemodule.c; since this is impossible to override from Python. 2. Check sys.stdout if it's closed before calling the print routine. Raise an IOError if so. Finally, here's some examples to illustrate what I am saying: alex:~% python -c print | head -n0 close failed: [Errno 32] Broken pipe alex:~% python -c while 1: print | head -n0 [The loop continues running, even if the output stream is closed] ^C Traceback (most recent call last): File string, line 1, in module KeyboardInterrupt close failed: [Errno 32] Broken pipe alex:~% py3k -c print() | head -n0 alex:~% py3k -c while 1: print() | head -n0 Traceback (most recent call last): ... IOError: [Errno 32] Broken pipe -- components: Interpreter Core messages: 58469 nosy: alexandre.vassalotti severity: normal status: open title: Broken pipes should be handled better in 2.x type: rfe versions: Python 2.5, Python 2.6 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1596 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1596] Broken pipes should be handled better in 2.x
Guido van Rossum added the comment: I'll entertain a patch for 2.6. For 2.5 I think this smells too much like a feature. -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1596 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com