diff --git a/IPython/gui/wx/ipshell_nonblocking.py b/IPython/gui/wx/ipshell_nonblocking.py index 6af9f20..4d85617 100644 --- a/IPython/gui/wx/ipshell_nonblocking.py +++ b/IPython/gui/wx/ipshell_nonblocking.py @@ -499,6 +499,7 @@ class NonBlockingIPShell(object): except: self._IP.showtraceback() else: + self._IP.write(str(self._IP.outputcache.prompt_out).strip()) self._iter_more = self._IP.push(line) if (self._IP.SyntaxTB.last_syntax_error and self._IP.rc.autoedit_syntax): self._IP.edit_syntax_error() diff --git a/IPython/gui/wx/ipython_view.py b/IPython/gui/wx/ipython_view.py index d560ad5..a8cc310 100644 --- a/IPython/gui/wx/ipython_view.py +++ b/IPython/gui/wx/ipython_view.py @@ -630,6 +630,8 @@ class IPShellWidget(wx.Panel): lines_to_execute = lines_to_execute.replace('\r','') self.IP.doExecute(lines_to_execute.encode(ENCODING)) self.updateHistoryTracker(lines) + if(self.text_ctrl.getCursorPos()!=0): + self.text_ctrl.removeCurrentLine() self.setCurrentState('WAIT_END_OF_EXECUTION') def evtStateExecuteDone(self,evt):