Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 42555:3e682ae9d298
1. Catch TypeError exception when writing to OutputWindow
2. PyShell: shell isn't working due to encoding issues. Temporarily direct
exceptions to the terminal. Also, trap exceptions occurring during write()
instead of passing.
Checking (2) in temporarily to aid finding the encoding problem in
IOBinding.py
| author | Kurt B. Kaiser <kbk@shore.net> |
|---|---|
| date | Sun, 12 Aug 2007 01:52:35 +0000 |
| parents | 6a09423164fe |
| children | 7a45e8b78d63 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Sun Aug 12 01:31:40 2007 +0000 +++ b/Lib/idlelib/PyShell.py Sun Aug 12 01:52:35 2007 +0000 @@ -825,7 +825,7 @@ self.console = PseudoFile(self, "console", IOBinding.encoding) if not use_subprocess: sys.stdout = self.stdout - sys.stderr = self.stderr +### sys.stderr = self.stderr # Don't redirect exceptions, pyshell NG sys.stdin = self # self.history = self.History(self.text) @@ -1214,7 +1214,8 @@ OutputWindow.write(self, s, tags, "iomark") self.text.mark_gravity("iomark", "left") except: - pass + raise ###pass # ### 11Aug07 KBK if we are expecting exceptions + # let's find out what they are and be specific. if self.canceled: self.canceled = 0 if not use_subprocess:
