Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 43120:fec2c0299a8c
1. Don't encode input strings to bytes.
2. Re-enable stderr redirection.
| author | Kurt B. Kaiser <kbk@shore.net> |
|---|---|
| date | Fri, 31 Aug 2007 04:15:13 +0000 |
| parents | 4c78c048c3ba |
| children | 3e5edf19d5f0 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Fri Aug 31 04:10:28 2007 +0000 +++ b/Lib/idlelib/PyShell.py Fri Aug 31 04:15:13 2007 +0000 @@ -827,7 +827,7 @@ 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 @@ 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
