eric6/MicroPython/MicroPythonCommandsInterface.py

branch
micropython
changeset 7102
5e77aa4671e6
parent 7095
8e10acb1cd85
child 7108
4f6133a01c6a
diff -r 40506ba8680c -r 5e77aa4671e6 eric6/MicroPython/MicroPythonCommandsInterface.py
--- a/eric6/MicroPython/MicroPythonCommandsInterface.py	Tue Jul 30 19:29:53 2019 +0200
+++ b/eric6/MicroPython/MicroPythonCommandsInterface.py	Tue Jul 30 19:43:18 2019 +0200
@@ -175,7 +175,9 @@
         Private method to switch 'raw' mode off.
         """
         if self.__serial:
-            self.__serial.write(b"\x02")    # send CTRL-B to cancel raw mode
+            self.__serial.write(b"\x02")      # send CTRL-B to cancel raw mode
+            self.__serial.readUntil(b">>> ")  # read until Python prompt
+            self.__serial.readAll()           # read all data and discard it
     
     def execute(self, commands):
         """

eric ide

mercurial