New submission from Amaury Forgeot d Arc <[email protected]>:

reload(sys) closes stdout on next gc.
The following script fails when output is redirected to a file:

import sys, gc
print "OK"
reload(sys)
gc.collect()
print "KO"


  File "/tmp/foo.py", line 5, in <module>
    print "KO"
IOError: [Errno 9] Bad file descriptor: '<fdopen>'

----------
messages: 5547
nosy: amaury, pypy-issue
priority: bug
status: unread
title: reload(sys) closes stdout

________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1442>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to