summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2007-08-12 01:52:35 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2007-08-12 01:52:35 (GMT)
commitcbbe98f04fb03922ff2e3b6bf35769cf63673153 (patch)
treebc153d343fef9fea56430ff9456236027b3dea9b /Lib/idlelib/PyShell.py
parent801c89be5dbf90defc492d9b81d6dec8e8a1a16a (diff)
downloadcpython-cbbe98f04fb03922ff2e3b6bf35769cf63673153.zip
cpython-cbbe98f04fb03922ff2e3b6bf35769cf63673153.tar.gz
cpython-cbbe98f04fb03922ff2e3b6bf35769cf63673153.tar.bz2
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
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index bfd659c..18ed3aa 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -825,7 +825,7 @@ class PyShell(OutputWindow):
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 @@ class PyShell(OutputWindow):
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: