##// END OF EJS Templates
Added --no-banner arg to qtconsole...
Helen ST -
Show More
@@ -615,10 +615,11 class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):
615 615
616 616 if clear:
617 617 self._control.clear()
618 self._append_plain_text(self.banner)
619 if self.kernel_banner:
620 self._append_plain_text(self.kernel_banner)
621
618 if self._display_banner:
619 self._append_plain_text(self.banner)
620 if self.kernel_banner:
621 self._append_plain_text(self.kernel_banner)
622
622 623 # update output marker for stdout/stderr, so that startup
623 624 # messages appear after banner:
624 625 self._append_before_prompt_pos = self._get_cursor().position()
@@ -50,6 +50,7 if os.name == 'nt':
50 50 from IPython.external.qt import QtCore, QtGui
51 51
52 52 # Local imports
53 from IPython.config.application import boolean_flag
53 54 from IPython.config.application import catch_config_error
54 55 from IPython.core.application import BaseIPythonApplication
55 56 from IPython.qt.console.ipython_widget import IPythonWidget
@@ -91,6 +92,11 qt_flags = {
91 92 'plain' : ({'IPythonQtConsoleApp' : {'plain' : True}},
92 93 "Disable rich text support."),
93 94 }
95 qt_flags.update(boolean_flag(
96 'banner', 'IPythonQtConsoleApp.display_banner',
97 "Display a banner upon starting IPython.",
98 "Don't display a banner upon starting IPython."
99 ))
94 100
95 101 # and app_flags from the Console Mixin
96 102 qt_flags.update(app_flags)
@@ -168,6 +174,10 class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):
168 174 plain = CBool(False, config=True,
169 175 help="Use a plaintext widget instead of rich text (plain can't print/save).")
170 176
177 display_banner = CBool(True, config=True,
178 help="Whether to display a banner upon starting IPython."
179 )
180
171 181 def _plain_changed(self, name, old, new):
172 182 kind = 'plain' if new else 'rich'
173 183 self.config.ConsoleWidget.kind = kind
@@ -255,6 +265,7 class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):
255 265 self.widget._existing = self.existing
256 266 self.widget._may_close = not self.existing
257 267 self.widget._confirm_exit = self.confirm_exit
268 self.widget._display_banner = self.display_banner
258 269
259 270 self.widget.kernel_manager = self.kernel_manager
260 271 self.widget.kernel_client = self.kernel_client
General Comments 0
You need to be logged in to leave comments. Login now