--- a/eric6/QScintilla/Shell.py Sat Feb 27 11:28:22 2021 +0100 +++ b/eric6/QScintilla/Shell.py Sat Feb 27 12:08:23 2021 +0100 @@ -238,10 +238,24 @@ dbs.clientException.connect(self.__clientException) dbs.clientSyntaxError.connect(self.__clientSyntaxError) dbs.clientSignal.connect(self.__clientSignal) + dbs.mainClientExit.connect(self.__writePrompt) self.dbs = dbs self.__debugUI = None + # Make sure we have prompts. + if self.passive: + sys.ps1 = self.tr("Passive >>> ") + else: + try: + sys.ps1 + except AttributeError: + sys.ps1 = ">>> " + try: + sys.ps2 + except AttributeError: + sys.ps2 = "... " + # Initialize instance variables. self.__initialise() self.prline = 0 @@ -269,19 +283,6 @@ self.clearKeys() self.__actionsAdded = False - # Make sure we have prompts. - if self.passive: - sys.ps1 = self.tr("Passive >>> ") - else: - try: - sys.ps1 - except AttributeError: - sys.ps1 = ">>> " - try: - sys.ps2 - except AttributeError: - sys.ps2 = "... " - if self.passive: self.__getBanner()