changeset: 42572:a724279fc931 user: Martin v. Löwis date: Mon Aug 13 06:26:48 2007 +0000 files: Lib/idlelib/OutputWindow.py description: Allow str8 in .write(). diff -r 7a45e8b78d63 -r a724279fc931 Lib/idlelib/OutputWindow.py --- a/Lib/idlelib/OutputWindow.py Mon Aug 13 06:03:15 2007 +0000 +++ b/Lib/idlelib/OutputWindow.py Mon Aug 13 06:26:48 2007 +0000 @@ -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()