Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add qtconsole as subapp of terminal ipapp

Now 'ipython qtconsole' will behave the same as 'ipython-qtconsole'
  • Loading branch information...
commit f744a3ce9c42831ea6f20ef1854b19c7a7982f29 1 parent 9c14773
@minrk authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 IPython/frontend/terminal/ipapp.py
View
13 IPython/frontend/terminal/ipapp.py
@@ -206,9 +206,16 @@ class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):
# command_line_loader = IPAppConfigLoader
default_config_file_name = default_config_file_name
crash_handler_class = IPAppCrashHandler
+
flags = Dict(flags)
aliases = Dict(aliases)
classes = [InteractiveShellApp, TerminalInteractiveShell, ProfileDir, PlainTextFormatter]
+ subcommands = Dict(dict(
+ qtconsole=('IPython.frontend.qt.console.ipythonqt.IPythonQtConsoleApp',
+ """Launch the IPython QtConsole. Also launched as ipython-qtconsole"""
+ )
+ ))
+
# *do* autocreate requested profile
auto_create=Bool(True)
copy_config_files=Bool(True)
@@ -259,9 +266,11 @@ def _file_to_run_changed(self, name, old, new):
def initialize(self, argv=None):
"""Do actions after construct, but before starting the app."""
super(TerminalIPythonApp, self).initialize(argv)
+ if self.subapp is not None:
+ # don't bother initializing further, starting subapp
+ return
if not self.ignore_old_config:
check_for_old_config(self.ipython_dir)
-
# print self.extra_args
if self.extra_args:
self.file_to_run = self.extra_args[0]
@@ -322,6 +331,8 @@ def init_gui_pylab(self):
self.shell.showtraceback()
def start(self):
+ if self.subapp is not None:
+ return self.subapp.start()
# perform any prexec steps:
if self.interact:
self.log.debug("Starting IPython's mainloop...")
Please sign in to comment.
Something went wrong with that request. Please try again.