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

martin.v.loewis python-3000-checkins at python.org
Mon Aug 13 08:26:49 CEST 2007


Author: martin.v.loewis
Date: Mon Aug 13 08:26:48 2007
New Revision: 56978

Modified:
   python/branches/py3k/Lib/idlelib/OutputWindow.py
Log:
Allow str8 in .write().


Modified: python/branches/py3k/Lib/idlelib/OutputWindow.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/OutputWindow.py	(original)
+++ python/branches/py3k/Lib/idlelib/OutputWindow.py	Mon Aug 13 08:26:48 2007
@@ -35,7 +35,8 @@
     # Act as output file
 
     def write(self, s, tags=(), mark="insert"):
-        assert isinstance(s, str), repr(s)
+        if isinstance(s, (bytes, str8)):
+            s = s.decode(IOBinding.encoding, "replace")
         self.text.insert(mark, s, tags)
         self.text.see(mark)
         self.text.update()


More information about the Python-3000-checkins mailing list