]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't try to convert str to Unicode anymore.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 12 Aug 2007 07:06:14 +0000 (07:06 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 12 Aug 2007 07:06:14 +0000 (07:06 +0000)
Lib/idlelib/OutputWindow.py

index 4c07c035e8a8d8dbd63505e8ab941c2fe0f07ca6..0e8fd6db0a80ec2a30050fdbacda2797ad134bf6 100644 (file)
@@ -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()