Show More
@@ -88,9 +88,9 class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin): | |||
|
88 | 88 | custom_restart = Bool(False) |
|
89 | 89 | custom_restart_kernel_died = QtCore.Signal(float) |
|
90 | 90 | custom_restart_requested = QtCore.Signal() |
|
91 | ||
|
92 |
# Emitted when a |
|
|
93 | # processed by the FrontendWidget. | |
|
91 | ||
|
92 | # Emitted when a user-visible 'execute_reply' has been received from the | |
|
93 | # kernel and processed by the FrontendWidget. Contains the response message. | |
|
94 | 94 | executed = QtCore.Signal(object) |
|
95 | 95 | |
|
96 | 96 | # Emitted when an exit request has been received from the kernel. |
@@ -152,6 +152,16 class HistoryConsoleWidget(ConsoleWidget): | |||
|
152 | 152 | history = prefix |
|
153 | 153 | self.input_buffer = history |
|
154 | 154 | |
|
155 | def history_tail(self, n=10): | |
|
156 | """ Get the local history list. | |
|
157 | ||
|
158 | Parameters | |
|
159 | ---------- | |
|
160 | n : int | |
|
161 | The (maximum) number of history items to get. | |
|
162 | """ | |
|
163 | return self._history[-n:] | |
|
164 | ||
|
155 | 165 | #--------------------------------------------------------------------------- |
|
156 | 166 | # 'HistoryConsoleWidget' protected interface |
|
157 | 167 | #--------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now