diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-08-13 06:26:48 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-08-13 06:26:48 (GMT) |
commit | 0f98d8f8ead113933b569f2fce74229e4561f9cf (patch) | |
tree | 111b8ce3047c9c298a0553e0f832e3806ab7db86 /Lib/idlelib/OutputWindow.py | |
parent | 98ff898c4637208f28f862a64779c2ea3f4b809d (diff) | |
download | cpython-0f98d8f8ead113933b569f2fce74229e4561f9cf.zip cpython-0f98d8f8ead113933b569f2fce74229e4561f9cf.tar.gz cpython-0f98d8f8ead113933b569f2fce74229e4561f9cf.tar.bz2 |
Allow str8 in .write().
Diffstat (limited to 'Lib/idlelib/OutputWindow.py')
-rw-r--r-- | Lib/idlelib/OutputWindow.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/OutputWindow.py b/Lib/idlelib/OutputWindow.py index 83d5771..330da76 100644 --- a/Lib/idlelib/OutputWindow.py +++ b/Lib/idlelib/OutputWindow.py @@ -35,7 +35,8 @@ class OutputWindow(EditorWindow): # 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() |