eric6/QScintilla/Shell.py

branch
maintenance
changeset 7437
1148ca40ea36
parent 7382
df744f939cca
parent 7387
2fb33905ff6b
child 7560
343db73c4842
--- a/eric6/QScintilla/Shell.py	Mon Feb 03 19:51:20 2020 +0100
+++ b/eric6/QScintilla/Shell.py	Sat Mar 07 11:11:07 2020 +0100
@@ -992,6 +992,12 @@
         QApplication.processEvents()
         
         # Finally process the accumulated text
+        self.__flushQueuedText()
+    
+    def __flushQueuedText(self):
+        """
+        Private slot to flush the accumulated text output.
+        """
         self.__write(self.__queuedText)
         
         self.__queuedText = ''
@@ -1000,7 +1006,7 @@
         # little trick to get the cursor position registered within QScintilla
         self.SendScintilla(QsciScintilla.SCI_CHARLEFT)
         self.SendScintilla(QsciScintilla.SCI_CHARRIGHT)
-
+    
     def __write(self, s):
         """
         Private method to display some text without queuing.
@@ -1031,20 +1037,24 @@
         """
         self.__write(self.tr("StdErr: {0}").format(s))
         
-    def __raw_input(self, s, echo):
+    def __raw_input(self, prompt, echo):
         """
         Private method to handle raw input.
         
-        @param s prompt to be displayed (string)
-        @param echo Flag indicating echoing of the input (boolean)
+        @param prompt prompt to be displayed
+        @type str
+        @param echo Flag indicating echoing of the input
+        @type bool
         """
-        # Get all text which is still waiting for output
-        QApplication.processEvents()
-        
         self.setFocus()
         self.inRawMode = True
         self.echoInput = echo
-        self.__writeQueued(s)
+        
+        # Get all text which is still waiting for output
+        QApplication.processEvents()
+        self.__flushQueuedText()
+        
+        self.__write(prompt)
         line, col = self.__getEndPos()
         self.setCursorPosition(line, col)
         buf = self.text(line)

eric ide

mercurial