193 connection = None |
193 connection = None |
194 else: |
194 else: |
195 connection = self.__connection |
195 connection = self.__connection |
196 |
196 |
197 if connection is not None: |
197 if connection is not None: |
198 connection.write(cmd.encode('utf8', 'backslashreplace')) |
198 data = cmd.encode('utf8', 'backslashreplace') |
|
199 length = "{0:09d}".format(len(data)) |
|
200 connection.write(length.encode() + data) |
199 if flush: |
201 if flush: |
200 connection.flush() |
202 connection.flush() |
201 |
203 |
202 def startClient(self, interpreter, clientScript, clientArgs, idString=""): |
204 def startClient(self, interpreter, clientScript, clientArgs, idString=""): |
203 """ |
205 """ |