src/eric7/MicroPython/MicroPythonSerialDeviceInterface.py

branch
mpy_network
changeset 10012
d649d500a9a1
parent 10008
c5bcafe3485c
child 10033
91b0939626ff
equal deleted inserted replaced
10011:26a7d607b8f6 10012:d649d500a9a1
393 ) 393 )
394 if self.__serial.hasTimedOut(): 394 if self.__serial.hasTimedOut():
395 self.__blockReadyRead = False 395 self.__blockReadyRead = False
396 return b"", b"Timeout while processing commands." 396 return b"", b"Timeout while processing commands."
397 397
398 # get rid of any OSD string 398 # get rid of any OSD string and send it
399 # TODO: emit the OSD data
400 if result.startswith(b"\x1b]0;"): 399 if result.startswith(b"\x1b]0;"):
401 result = result.split(b"\x1b\\")[-1] 400 osd, result = result.split(b"\x1b\\", 1)
401 self.osdInfo.emit(osd[4:].decode("utf-8"))
402 402
403 if self.TracebackMarker in result: 403 if self.TracebackMarker in result:
404 errorIndex = result.find(self.TracebackMarker) 404 errorIndex = result.find(self.TracebackMarker)
405 out, err = result[:errorIndex], result[errorIndex:] 405 out, err = result[:errorIndex], result[errorIndex:]
406 else: 406 else:

eric ide

mercurial