402 |
402 |
403 # switch off paste mode causing the commands to be executed |
403 # switch off paste mode causing the commands to be executed |
404 self.__pasteOff() |
404 self.__pasteOff() |
405 QThread.msleep(10) |
405 QThread.msleep(10) |
406 # read until Python prompt |
406 # read until Python prompt |
407 result = self.__serial.readUntil(b">>> ", timeout=timeout).replace(b">>> ", b"").strip() |
407 result = ( |
|
408 self.__serial.readUntil(b">>> ", timeout=timeout) |
|
409 .replace(b">>> ", b"") |
|
410 .strip() |
|
411 ) |
408 if self.__serial.hasTimedOut(): |
412 if self.__serial.hasTimedOut(): |
409 self.__blockReadyRead = False |
413 self.__blockReadyRead = False |
410 return b"", b"Timeout while processing commands." |
414 return b"", b"Timeout while processing commands." |
411 |
415 |
412 # get rid of any OSD string |
416 # get rid of any OSD string |