diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-08-12 07:06:14 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-08-12 07:06:14 (GMT) |
commit | 646049ec307cb24d2992d9c1d00c01b2a5fab122 (patch) | |
tree | 44376bbae81cde3af1be67647326be1fed827e7b /Lib | |
parent | 9b2a26989daade1c431e79ac89880ca84726c18b (diff) | |
download | cpython-646049ec307cb24d2992d9c1d00c01b2a5fab122.zip cpython-646049ec307cb24d2992d9c1d00c01b2a5fab122.tar.gz cpython-646049ec307cb24d2992d9c1d00c01b2a5fab122.tar.bz2 |
Don't try to convert str to Unicode anymore.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/OutputWindow.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Lib/idlelib/OutputWindow.py b/Lib/idlelib/OutputWindow.py index 4c07c03..0e8fd6d 100644 --- a/Lib/idlelib/OutputWindow.py +++ b/Lib/idlelib/OutputWindow.py @@ -35,16 +35,7 @@ class OutputWindow(EditorWindow): # Act as output file def write(self, s, tags=(), mark="insert"): - # Tk assumes that byte strings are Latin-1; - # we assume that they are in the locale's encoding - if isinstance(s, str): - try: - s = str(s, IOBinding.encoding) - except TypeError: - raise - except UnicodeError: - # some other encoding; let Tcl deal with it - pass + assert isinstance(s, str) self.text.insert(mark, s, tags) self.text.see(mark) self.text.update() |