summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/OutputWindow.py3
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()