Show More
@@ -534,7 +534,7 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||
|
534 | 534 | """ Called when the KernelManager channels have started listening or |
|
535 | 535 | when the frontend is assigned an already listening KernelManager. |
|
536 | 536 | """ |
|
537 |
self.reset( |
|
|
537 | self.reset(clear=True) | |
|
538 | 538 | |
|
539 | 539 | #--------------------------------------------------------------------------- |
|
540 | 540 | # 'FrontendWidget' public interface |
@@ -568,12 +568,12 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||
|
568 | 568 | self._append_plain_text('Kernel process is either remote or ' |
|
569 | 569 | 'unspecified. Cannot interrupt.\n') |
|
570 | 570 | |
|
571 |
def reset(self, |
|
|
572 |
""" Resets the widget to its initial state if `` |
|
|
571 | def reset(self, clear=False): | |
|
572 | """ Resets the widget to its initial state if ``clear`` parameter or | |
|
573 | 573 | ``clear_on_kernel_restart`` configuration setting is True, otherwise |
|
574 | 574 | prints a visual indication of the fact that the kernel restarted, but |
|
575 | 575 | does not clear the traces from previous usage of the kernel before it |
|
576 |
was restarted. With `` |
|
|
576 | was restarted. With ``clear=True``, it is similar to ``%clear``, but | |
|
577 | 577 | also re-writes the banner and aborts execution if necessary. |
|
578 | 578 | """ |
|
579 | 579 | if self._executing: |
@@ -582,7 +582,7 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||
|
582 | 582 | self._reading = False |
|
583 | 583 | self._highlighter.highlighting_on = False |
|
584 | 584 | |
|
585 |
if self.clear_on_kernel_restart or |
|
|
585 | if self.clear_on_kernel_restart or clear: | |
|
586 | 586 | self._control.clear() |
|
587 | 587 | self._append_plain_text(self.banner) |
|
588 | 588 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now