Terry J. Reedy added the comment: I thought of this exact patch, but then decided against it. 1. The bug is in site.py -- see thread [Python-Dev] Idle, site.py, and the release candidates for a better explanation and solution. 2. The Idle behavior, inherited from io.IOBase is correct. 3. The consequence on *other* Python code of a fake fileno is unknown.
The solution I gave for site.py is to begin .__call__ with if sys.stdin.__name__ == 'PseudoInputFile': sys.stdin.close() This should be safe to do without another release candidate. The name as seen by the user process should be checked but I cannot do so at the moment (on substitute substitute computer). This would only be done in the release by the file managers. The exact decision is up to them. So I would replace IDLE with site.py in the title. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17585> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com