Issue 13532: Allow bytearrays to be written also.
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 3e23e6c..2bf97a5 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1265,8 +1265,8 @@
self.encoding = encoding
def write(self, s):
- if not isinstance(s, basestring):
- raise TypeError('must be str, not ' + type(s).__name__)
+ if not isinstance(s, (basestring, bytearray)):
+ raise TypeError('must be string, not ' + type(s).__name__)
self.shell.write(s, self.tags)
def writelines(self, lines):