Issue 13532: Allow bytearrays to be written also.
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 9389a2b..67d1881 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -263,8 +263,8 @@
         return setattr(self.rpc, name, value)
 
     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__)
         return self.rpc.write(s)
 
 class MyHandler(rpc.RPCHandler):