src/eric7/MicroPython/MicroPythonWidget.py

branch
eric7
changeset 11184
33a600dd86f4
parent 11090
f5f5f5803935
child 11186
c2d18aefef6b
--- a/src/eric7/MicroPython/MicroPythonWidget.py	Fri Mar 21 18:01:35 2025 +0100
+++ b/src/eric7/MicroPython/MicroPythonWidget.py	Fri Mar 21 18:11:36 2025 +0100
@@ -979,6 +979,17 @@
             with EricOverrideCursor():
                 self.__disconnectFromDevice()
 
+    def insertData(self, data):
+        """
+        Public method to insert some data as if it was sent directly from the device.
+
+        @param data data to be inserted into the REPL pane
+        @type str or bytes
+        """
+        if isinstance(data, str):
+            data = data.encode("utf-8")
+        self.replWidget.replEdit().processData(data)
+
     ##################################################################
     ## Super Menu related methods below
     ##################################################################

eric ide

mercurial