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