diff --git a/IPython/frontend/qt/console/frontend_widget.py b/IPython/frontend/qt/console/frontend_widget.py index 79a627f..92e7b4a 100644 --- a/IPython/frontend/qt/console/frontend_widget.py +++ b/IPython/frontend/qt/console/frontend_widget.py @@ -88,9 +88,9 @@ class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin): custom_restart = Bool(False) custom_restart_kernel_died = QtCore.Signal(float) custom_restart_requested = QtCore.Signal() - - # Emitted when an 'execute_reply' has been received from the kernel and - # processed by the FrontendWidget. + + # Emitted when a user-visible 'execute_reply' has been received from the + # kernel and processed by the FrontendWidget. Contains the response message. executed = QtCore.Signal(object) # Emitted when an exit request has been received from the kernel. diff --git a/IPython/frontend/qt/console/history_console_widget.py b/IPython/frontend/qt/console/history_console_widget.py index ac3e4b8..1bf1a04 100644 --- a/IPython/frontend/qt/console/history_console_widget.py +++ b/IPython/frontend/qt/console/history_console_widget.py @@ -152,6 +152,16 @@ class HistoryConsoleWidget(ConsoleWidget): history = prefix self.input_buffer = history + def history_tail(self, n=10): + """ Get the local history list. + + Parameters + ---------- + n : int + The (maximum) number of history items to get. + """ + return self._history[-n:] + #--------------------------------------------------------------------------- # 'HistoryConsoleWidget' protected interface #---------------------------------------------------------------------------