Reloading sys breaks console
Bug #620339 reported by
David Coles
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IVLE |
Triaged
|
Low
|
Unassigned |
Bug Description
If you reload sys in the Python console then sys.stdout (and sys.stdin) gets replaced with the real STDOUT (and STDIN) of the process. We then loose the ability to print to the browser.
print "You see this!"
import sys
reload(sys)
print "But not this!"
I think this might be rather hard to fix without changing python-console so that we don't change sys.stdout and sys.stdin. A good workaround is not to try to reload sys. :)
To post a comment you must log in.