[Python-3000-checkins] r56951 - python/branches/py3k/Lib/idlelib/OutputWindow.py

martin.v.loewis python-3000-checkins at python.org
Sun Aug 12 09:06:14 CEST 2007


Author: martin.v.loewis
Date: Sun Aug 12 09:06:14 2007
New Revision: 56951

Modified:
   python/branches/py3k/Lib/idlelib/OutputWindow.py
Log:
Don't try to convert str to Unicode anymore.


Modified: python/branches/py3k/Lib/idlelib/OutputWindow.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/OutputWindow.py	(original)
+++ python/branches/py3k/Lib/idlelib/OutputWindow.py	Sun Aug 12 09:06:14 2007
@@ -35,16 +35,7 @@
     # 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()


More information about the Python-3000-checkins mailing list