| 177 | |
| 178 | |
| 179 | class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): |
| 180 | name = u'ipython' |
| 181 | description = usage.cl_usage |
| 182 | crash_handler_class = IPAppCrashHandler |
| 183 | examples = _examples |
| 184 | |
| 185 | flags = flags |
| 186 | aliases = aliases |
| 187 | classes = List() |
| 188 | |
| 189 | interactive_shell_class = Type( |
| 190 | klass=object, # use default_value otherwise which only allow subclasses. |
| 191 | default_value=TerminalInteractiveShell, |
| 192 | help="Class to use to instantiate the TerminalInteractiveShell object. Useful for custom Frontends" |
| 193 | ).tag(config=True) |
| 194 | |
| 195 | @default('classes') |
| 196 | def _classes_default(self): |
| 197 | """This has to be in a method, for TerminalIPythonApp to be available.""" |
| 198 | return [ |
| 199 | InteractiveShellApp, # ShellApp comes before TerminalApp, because |
| 200 | self.__class__, # it will also affect subclasses (e.g. QtConsole) |
| 201 | TerminalInteractiveShell, |
| 202 | HistoryManager, |
| 203 | ProfileDir, |
| 204 | PlainTextFormatter, |
| 205 | IPCompleter, |
| 206 | ScriptMagics, |
| 207 | LoggingMagics, |
| 208 | StoreMagics, |
| 209 | ] |
| 210 | |
| 211 | deprecated_subcommands = dict( |
| 212 | qtconsole=('qtconsole.qtconsoleapp.JupyterQtConsoleApp', |
| 213 | """DEPRECATED, Will be removed in IPython 6.0 : Launch the Jupyter Qt Console.""" |
| 214 | ), |
| 215 | notebook=('notebook.notebookapp.NotebookApp', |
| 216 | """DEPRECATED, Will be removed in IPython 6.0 : Launch the Jupyter HTML Notebook Server.""" |
| 217 | ), |
| 218 | console=('jupyter_console.app.ZMQTerminalIPythonApp', |
| 219 | """DEPRECATED, Will be removed in IPython 6.0 : Launch the Jupyter terminal-based Console.""" |
| 220 | ), |
| 221 | nbconvert=('nbconvert.nbconvertapp.NbConvertApp', |
| 222 | "DEPRECATED, Will be removed in IPython 6.0 : Convert notebooks to/from other formats." |
| 223 | ), |
| 224 | trust=('nbformat.sign.TrustNotebookApp', |
| 225 | "DEPRECATED, Will be removed in IPython 6.0 : Sign notebooks to trust their potentially unsafe contents at load." |
| 226 | ), |
| 227 | kernelspec=('jupyter_client.kernelspecapp.KernelSpecApp', |
| 228 | "DEPRECATED, Will be removed in IPython 6.0 : Manage Jupyter kernel specifications." |
| 229 | ), |
| 230 | ) |
| 231 | subcommands = dict( |
| 232 | profile = ("IPython.core.profileapp.ProfileApp", |
| 233 | "Create and manage IPython profiles." |
| 234 | ), |
| 235 | kernel = ("ipykernel.kernelapp.IPKernelApp", |
| 236 | "Start a kernel without an attached frontend." |
no test coverage detected