diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2007-08-31 04:15:13 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2007-08-31 04:15:13 (GMT) |
commit | 7cec252b9dd38a91911dcaa7248d74b0bb40395f (patch) | |
tree | 57fec7ebc25212c403db4043be54df33c76425b1 | |
parent | 639a8ffcb7bcdadc3f0dd6e70cbfdce134da6c7f (diff) | |
download | cpython-7cec252b9dd38a91911dcaa7248d74b0bb40395f.zip cpython-7cec252b9dd38a91911dcaa7248d74b0bb40395f.tar.gz cpython-7cec252b9dd38a91911dcaa7248d74b0bb40395f.tar.bz2 |
1. Don't encode input strings to bytes.
2. Re-enable stderr redirection.
-rw-r--r-- | Lib/idlelib/PyShell.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 6ec6251..3f9f567 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -827,7 +827,7 @@ class PyShell(OutputWindow): self.console = PseudoFile(self, "console", IOBinding.encoding) if not use_subprocess: sys.stdout = self.stdout -### sys.stderr = self.stderr # Don't redirect exceptions, pyshell NG + sys.stderr = self.stderr sys.stdin = self # self.history = self.History(self.text) @@ -991,12 +991,6 @@ class PyShell(OutputWindow): line = self.text.get("iomark", "end-1c") if len(line) == 0: # may be EOF if we quit our mainloop with Ctrl-C line = "\n" - if isinstance(line, str): - from idlelib import IOBinding - try: - line = line.encode(IOBinding.encoding) - except UnicodeError: - pass self.resetoutput() if self.canceled: self.canceled = 0 |