From: Martin v. Löwis Date: Sun, 12 Aug 2007 07:06:14 +0000 (+0000) Subject: Don't try to convert str to Unicode anymore. X-Git-Tag: v3.0a1~431 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=646049ec307cb24d2992d9c1d00c01b2a5fab122;p=thirdparty%2FPython%2Fcpython.git Don't try to convert str to Unicode anymore. --- diff --git a/Lib/idlelib/OutputWindow.py b/Lib/idlelib/OutputWindow.py index 4c07c035e8a8..0e8fd6db0a80 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()