Show More
@@ -143,9 +143,10 b' class Application(SingletonConfigurable):' | |||||
143 |
|
143 | |||
144 | def __init__(self, **kwargs): |
|
144 | def __init__(self, **kwargs): | |
145 | SingletonConfigurable.__init__(self, **kwargs) |
|
145 | SingletonConfigurable.__init__(self, **kwargs) | |
146 |
# |
|
146 | # Ensure my class is in self.classes, so my attributes appear in command line | |
147 | # options. |
|
147 | # options and config files. | |
148 | self.classes.insert(0, self.__class__) |
|
148 | if self.__class__ not in self.classes: | |
|
149 | self.classes.insert(0, self.__class__) | |||
149 |
|
150 | |||
150 | self.init_logging() |
|
151 | self.init_logging() | |
151 |
|
152 |
@@ -48,7 +48,7 b' from IPython.lib import inputhook' | |||||
48 | from IPython.utils import warn |
|
48 | from IPython.utils import warn | |
49 | from IPython.utils.path import get_ipython_dir, check_for_old_config |
|
49 | from IPython.utils.path import get_ipython_dir, check_for_old_config | |
50 | from IPython.utils.traitlets import ( |
|
50 | from IPython.utils.traitlets import ( | |
51 | Bool, Dict, CaselessStrEnum |
|
51 | Bool, List, Dict, CaselessStrEnum | |
52 | ) |
|
52 | ) | |
53 |
|
53 | |||
54 | #----------------------------------------------------------------------------- |
|
54 | #----------------------------------------------------------------------------- | |
@@ -189,8 +189,17 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):' | |||||
189 |
|
189 | |||
190 | flags = Dict(flags) |
|
190 | flags = Dict(flags) | |
191 | aliases = Dict(aliases) |
|
191 | aliases = Dict(aliases) | |
192 | classes = [InteractiveShellApp, TerminalInteractiveShell, ProfileDir, |
|
192 | classes = List() | |
193 | PlainTextFormatter] |
|
193 | def _classes_default(self): | |
|
194 | """This has to be in a method, for TerminalIPythonApp to be available.""" | |||
|
195 | return [ | |||
|
196 | InteractiveShellApp, # ShellApp comes before TerminalApp, because | |||
|
197 | self.__class__, # it will also affect subclasses (e.g. QtConsole) | |||
|
198 | TerminalInteractiveShell, | |||
|
199 | ProfileDir, | |||
|
200 | PlainTextFormatter, | |||
|
201 | ] | |||
|
202 | ||||
194 | subcommands = Dict(dict( |
|
203 | subcommands = Dict(dict( | |
195 | qtconsole=('IPython.frontend.qt.console.qtconsoleapp.IPythonQtConsoleApp', |
|
204 | qtconsole=('IPython.frontend.qt.console.qtconsoleapp.IPythonQtConsoleApp', | |
196 | """Launch the IPython Qt Console.""" |
|
205 | """Launch the IPython Qt Console.""" |
General Comments 0
You need to be logged in to leave comments.
Login now