Show More
@@ -216,13 +216,13 b' class ConsoleWidget(QtGui.QWidget):' | |||||
216 | pass |
|
216 | pass | |
217 | return False |
|
217 | return False | |
218 |
|
218 | |||
219 |
def clear(self, keep_input= |
|
219 | def clear(self, keep_input=True): | |
220 | """ Clear the console, then write a new prompt. If 'keep_input' is set, |
|
220 | """ Clear the console, then write a new prompt. If 'keep_input' is set, | |
221 | restores the old input buffer when the new prompt is written. |
|
221 | restores the old input buffer when the new prompt is written. | |
222 | """ |
|
222 | """ | |
223 | self._control.clear() |
|
|||
224 | if keep_input: |
|
223 | if keep_input: | |
225 | input_buffer = self.input_buffer |
|
224 | input_buffer = self.input_buffer | |
|
225 | self._control.clear() | |||
226 | self._show_prompt() |
|
226 | self._show_prompt() | |
227 | if keep_input: |
|
227 | if keep_input: | |
228 | self.input_buffer = input_buffer |
|
228 | self.input_buffer = input_buffer | |
@@ -1074,12 +1074,6 b' class ConsoleWidget(QtGui.QWidget):' | |||||
1074 | self._reading_callback = lambda: \ |
|
1074 | self._reading_callback = lambda: \ | |
1075 | callback(self.input_buffer.rstrip('\n')) |
|
1075 | callback(self.input_buffer.rstrip('\n')) | |
1076 |
|
1076 | |||
1077 | def _reset(self): |
|
|||
1078 | """ Clears the console and resets internal state variables. |
|
|||
1079 | """ |
|
|||
1080 | self._control.clear() |
|
|||
1081 | self._executing = self._reading = False |
|
|||
1082 |
|
||||
1083 | def _set_continuation_prompt(self, prompt, html=False): |
|
1077 | def _set_continuation_prompt(self, prompt, html=False): | |
1084 | """ Sets the continuation prompt. |
|
1078 | """ Sets the continuation prompt. | |
1085 |
|
1079 |
@@ -239,7 +239,7 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||||
239 | """ Called when the KernelManager channels have started listening or |
|
239 | """ Called when the KernelManager channels have started listening or | |
240 | when the frontend is assigned an already listening KernelManager. |
|
240 | when the frontend is assigned an already listening KernelManager. | |
241 | """ |
|
241 | """ | |
242 |
self._ |
|
242 | self._control.clear() | |
243 | self._append_plain_text(self._get_banner()) |
|
243 | self._append_plain_text(self._get_banner()) | |
244 | self._show_interpreter_prompt() |
|
244 | self._show_interpreter_prompt() | |
245 |
|
245 | |||
@@ -247,8 +247,8 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||||
247 | """ Called when the KernelManager channels have stopped listening or |
|
247 | """ Called when the KernelManager channels have stopped listening or | |
248 | when a listening KernelManager is removed from the frontend. |
|
248 | when a listening KernelManager is removed from the frontend. | |
249 | """ |
|
249 | """ | |
250 | # FIXME: Print a message here? |
|
250 | self._executing = self._reading = False | |
251 | pass |
|
251 | self._highlighter.highlighting_on = False | |
252 |
|
252 | |||
253 | #--------------------------------------------------------------------------- |
|
253 | #--------------------------------------------------------------------------- | |
254 | # 'FrontendWidget' interface |
|
254 | # 'FrontendWidget' interface |
General Comments 0
You need to be logged in to leave comments.
Login now