prevent IDLE from trying to close when sys.stdin is reassigned (#17838)

This commit is contained in:
Benjamin Peterson 2013-05-11 22:24:28 -05:00
parent 81641d6ebc
commit 0d4931eb9e
2 changed files with 7 additions and 0 deletions

View File

@ -297,6 +297,11 @@ class MyHandler(rpc.RPCHandler):
# page help() text to shell. # page help() text to shell.
import pydoc # import must be done here to capture i/o binding import pydoc # import must be done here to capture i/o binding
pydoc.pager = pydoc.plainpager pydoc.pager = pydoc.plainpager
# Keep a reference to stdin so that it won't try to exit IDLE if
# sys.stdin gets changed from within IDLE's shell. See issue17838.
self._keep_stdin = sys.stdin
self.interp = self.get_remote_proxy("interp") self.interp = self.get_remote_proxy("interp")
rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05) rpc.RPCHandler.getresponse(self, myseq=None, wait=0.05)

View File

@ -118,6 +118,8 @@ Library
IDLE IDLE
---- ----
- Issue #17838: Allow sys.stdin to be reassigned.
- Issue #14735: Update IDLE docs to omit "Control-z on Windows". - Issue #14735: Update IDLE docs to omit "Control-z on Windows".
- Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit(). - Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().