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
diff --git a/Lib/idlelib/OutputWindow.py b/Lib/idlelib/OutputWindow.py
index ef155a4..4c07c03 100644
--- a/Lib/idlelib/OutputWindow.py
+++ b/Lib/idlelib/OutputWindow.py
@@ -40,6 +40,8 @@
if isinstance(s, str):
try:
s = str(s, IOBinding.encoding)
+ except TypeError:
+ raise
except UnicodeError:
# some other encoding; let Tcl deal with it
pass