823 |
823 |
824 self.__write(sys.ps1) |
824 self.__write(sys.ps1) |
825 |
825 |
826 def __writePrompt(self): |
826 def __writePrompt(self): |
827 """ |
827 """ |
828 Private method to write the prompt. |
828 Private method to write the prompt using a write queue. |
829 """ |
829 """ |
830 # get all queued text first by forcing the -_concatenateText() to run |
830 self.queueText.emit(self.inContinue and sys.ps2 or sys.ps1) |
831 self.__concatenateText("") |
831 |
832 |
|
833 self.__write(self.inContinue and sys.ps2 or sys.ps1) |
|
834 # little trick to get the cursor position registered within QScintilla |
|
835 self.SendScintilla(QsciScintilla.SCI_CHARLEFT) |
|
836 self.SendScintilla(QsciScintilla.SCI_CHARRIGHT) |
|
837 |
|
838 def __clientStatement(self, more): |
832 def __clientStatement(self, more): |
839 """ |
833 """ |
840 Private method to handle the response from the debugger client. |
834 Private method to handle the response from the debugger client. |
841 |
835 |
842 @param more flag indicating that more user input is required (boolean) |
836 @param more flag indicating that more user input is required (boolean) |
843 """ |
837 """ |
844 if not self.inRawMode: |
838 if not self.inRawMode: |
845 self.inContinue = more |
839 self.inContinue = more |
846 self.__writePrompt() |
840 self.__writePrompt() |
847 self.inCommandExecution = False |
841 self.inCommandExecution = False |
848 |
842 |
849 def __clientException(self, exceptionType, exceptionMessage, stackTrace): |
843 def __clientException(self, exceptionType, exceptionMessage, stackTrace): |
850 """ |
844 """ |
851 Private method to handle an exception of the client. |
845 Private method to handle an exception of the client. |
852 |
846 |
853 @param exceptionType type of exception raised (string) |
847 @param exceptionType type of exception raised (string) |
967 # Finally process the accumulated text |
961 # Finally process the accumulated text |
968 self.__write(self.__queuedText) |
962 self.__write(self.__queuedText) |
969 |
963 |
970 self.__queuedText = '' |
964 self.__queuedText = '' |
971 self.__blockTextProcessing = False |
965 self.__blockTextProcessing = False |
|
966 |
|
967 # little trick to get the cursor position registered within QScintilla |
|
968 self.SendScintilla(QsciScintilla.SCI_CHARLEFT) |
|
969 self.SendScintilla(QsciScintilla.SCI_CHARRIGHT) |
972 |
970 |
973 def __write(self, s): |
971 def __write(self, s): |
974 """ |
972 """ |
975 Private method to display some text without queuing. |
973 Private method to display some text without queuing. |
976 |
974 |