eric6/DebugClients/Python/AsyncFile.py

changeset 7760
fcd3322bf6ed
parent 7707
6abcf4275d0e
child 7802
eefe954f01e8
child 7836
2f0d208b8137
--- a/eric6/DebugClients/Python/AsyncFile.py	Tue Oct 06 17:52:44 2020 +0200
+++ b/eric6/DebugClients/Python/AsyncFile.py	Tue Oct 06 17:55:10 2020 +0200
@@ -333,10 +333,14 @@
         Public method to write a string to the file.
         
         @param s text to be written
-        @type str
+        @type str, bytes or bytearray
         """
         self.__checkMode('w')
         
+        if isinstance(s, (bytes, bytearray)):
+            # convert to string to send it
+            s = repr(s)
+        
         cmd = prepareJsonCommand("ClientOutput", {
             "text": s,
         })

eric ide

mercurial