mirror of https://github.com/python/cpython
Allow str8 in .write().
This commit is contained in:
parent
98ff898c46
commit
0f98d8f8ea
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue