| 185 | |
| 186 | |
| 187 | class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): |
| 188 | name = "ipython" |
| 189 | description = usage.cl_usage |
| 190 | crash_handler_class = IPAppCrashHandler # typing: ignore[assignment] |
| 191 | examples = _examples |
| 192 | |
| 193 | flags = flags |
| 194 | aliases = aliases |
| 195 | classes = List() |
| 196 | |
| 197 | interactive_shell_class = Type( |
| 198 | klass=object, # use default_value otherwise which only allow subclasses. |
| 199 | default_value=TerminalInteractiveShell, |
| 200 | help="Class to use to instantiate the TerminalInteractiveShell object. Useful for custom Frontends" |
| 201 | ).tag(config=True) |
| 202 | |
| 203 | @default('classes') |
| 204 | def _classes_default(self): |
| 205 | """This has to be in a method, for TerminalIPythonApp to be available.""" |
| 206 | return [ |
| 207 | InteractiveShellApp, # ShellApp comes before TerminalApp, because |
| 208 | self.__class__, # it will also affect subclasses (e.g. QtConsole) |
| 209 | TerminalInteractiveShell, |
| 210 | HistoryManager, |
| 211 | MagicsManager, |
| 212 | ProfileDir, |
| 213 | PlainTextFormatter, |
| 214 | IPCompleter, |
| 215 | ScriptMagics, |
| 216 | LoggingMagics, |
| 217 | StoreMagics, |
| 218 | ] |
| 219 | |
| 220 | subcommands = dict( |
| 221 | profile = ("IPython.core.profileapp.ProfileApp", |
| 222 | "Create and manage IPython profiles." |
| 223 | ), |
| 224 | kernel = ("ipykernel.kernelapp.IPKernelApp", |
| 225 | "Start a kernel without an attached frontend." |
| 226 | ), |
| 227 | locate=('IPython.terminal.ipapp.LocateIPythonApp', |
| 228 | LocateIPythonApp.description |
| 229 | ), |
| 230 | history=('IPython.core.historyapp.HistoryApp', |
| 231 | "Manage the IPython history database." |
| 232 | ), |
| 233 | ) |
| 234 | |
| 235 | # *do* autocreate requested profile, but don't create the config file. |
| 236 | auto_create = Bool(True).tag(config=True) |
| 237 | |
| 238 | # configurables |
| 239 | quick = Bool(False, |
| 240 | help="""Start IPython quickly by skipping the loading of config files.""" |
| 241 | ).tag(config=True) |
| 242 | @observe('quick') |
| 243 | def _quick_changed(self, change): |
| 244 | if change['new']: |
no outgoing calls
no test coverage detected
searching dependent graphs…