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
This commit is contained in:
Kurt B. Kaiser 2007-08-12 01:52:35 +00:00
parent 801c89be5d
commit cbbe98f04f
2 changed files with 5 additions and 2 deletions

View file

@ -40,6 +40,8 @@ class OutputWindow(EditorWindow):
if isinstance(s, str):
try:
s = str(s, IOBinding.encoding)
except TypeError:
raise
except UnicodeError:
# some other encoding; let Tcl deal with it
pass