]> granicus.if.org Git - python/commitdiff
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 25 Jan 2013 13:34:21 +0000 (15:34 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 25 Jan 2013 13:34:21 +0000 (15:34 +0200)
interface and support all mandatory methods and properties.

1  2 
Lib/idlelib/PyShell.py
Lib/idlelib/run.py
Misc/NEWS

Simple merge
index dbf046bc5d36993ff4c37037143bf6d209185f4b,7d0941e80b798c3f7c20173fda8342f3ab50c88f..d10591246fd823d0a9ef9ef96b1008dc3b0564f7
@@@ -323,11 -270,14 +285,15 @@@ class MyHandler(rpc.RPCHandler)
          """Override base method"""
          executive = Executive(self)
          self.register("exec", executive)
-         self.console = self.get_remote_proxy("stdin")
-         sys.stdin = _RPCInputFile(self.console)
-         sys.stdout = _RPCOutputFile(self.get_remote_proxy("stdout"))
-         sys.stderr = _RPCOutputFile(self.get_remote_proxy("stderr"))
+         self.console = self.get_remote_proxy("console")
+         sys.stdin = PyShell.PseudoInputFile(self.console, "stdin",
+                 IOBinding.encoding)
+         sys.stdout = PyShell.PseudoOutputFile(self.console, "stdout",
+                 IOBinding.encoding)
+         sys.stderr = PyShell.PseudoOutputFile(self.console, "stderr",
+                 IOBinding.encoding)
 +        sys.displayhook = rpc.displayhook
          # page help() text to shell.
          import pydoc # import must be done here to capture i/o binding
          pydoc.pager = pydoc.plainpager
diff --cc Misc/NEWS
Simple merge