Message99351
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 a closed sys.stderr.
To reproduce (using bash):
<pre>
# python -V
Python 2.6.4
# python -c 'print "x" * 8191' 1>&- ; echo $?
close failed in file object destructor:
Error in sys.excepthook:
Original exception was:
0
# python -c 'print "x" * 8192' 1>&- ; echo $?
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 9] Bad file descriptor
1
</pre> |
|
Date |
User |
Action |
Args |
2010-02-15 01:05:08 | tholzer | set | recipients:
+ tholzer |
2010-02-15 01:05:07 | tholzer | set | messageid: <1266195907.59.0.6287236457.issue7932@psf.upfronthosting.co.za> |
2010-02-15 01:04:07 | tholzer | link | issue7932 messages |
2010-02-15 01:04:05 | tholzer | create | |
|