This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7.

If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release).

Module: core.application

An application for IPython.

All top-level applications should use the classes in this module for handling configuration and creating configurables.

The job of an Application is to create the master configuration object and then create the configurable objects, passing the config to them.

2 Classes

class IPython.core.application.ProfileAwareConfigLoader(filename: str, path: str | None = None, **kw: Any)

Bases: PyFileConfigLoader

A Python file config loader that is aware of IPython profiles.

load_subconfig(fname, path=None, profile=None)

Injected into config file namespace as load_subconfig

class IPython.core.application.BaseIPythonApplication(**kwargs: Any)

Bases: Application


Create a configurable given a config config.

  • config (Config) – If this is empty, default values are used. If config is a Config instance, it will be used to configure the instance.

  • parent (Configurable instance, optional) – The parent Configurable instance of this object.


Subclasses of Configurable must call the __init__() method of Configurable before doing anything else and using super():

class MyConfigurable(Configurable):
    def __init__(self, config=None):
        super(MyConfigurable, self).__init__(config=config)
        # Then any other code you need to finish initialization.

This ensures that instances will be configured properly.


Whether to create profile dir if it doesn’t exist


Whether to install the default config files into the profile dir. If a new profile is being created, and IPython contains config files for that profile, then they will be staged into the new directory. Otherwise, default config files will be automatically generated.

excepthook(etype, evalue, tb)

this is sys.excepthook after init_crashhandler

set self.verbose_crash=True to use our full crashhandler, instead of a regular traceback with a short message (crash_handler_lite)


Path to an extra config file to load.

If specified, load this config file in addition to any other IPython config.


[optionally] copy default config files into profile dir.


Create a crash handler, typically setting sys.excepthook to it.


initialize the profile dir


Do the basic steps to configure me.

Override in subclasses.


The name of the IPython directory. This directory is used for logging configuration (through profiles), history storage, etc. The default is usually $HOME/.ipython. This option can also be specified through the environment variable IPYTHONDIR.


Load the config file.

By default, errors in loading config are handled, and a warning printed on screen. For testing, the suppress_errors option is set to False, so errors will make tests fail.

suppress_errors default value is to be None in which case the behavior default to the one of traitlets.Application.

The default value can be set :
  • to False by setting ‘IPYTHON_SUPPRESS_CONFIG_ERRORS’ environment variable to ‘0’, or ‘false’ (case insensitive).

  • to True by setting ‘IPYTHON_SUPPRESS_CONFIG_ERRORS’ environment variable to ‘1’ or ‘true’ (case insensitive).

  • to None by setting ‘IPYTHON_SUPPRESS_CONFIG_ERRORS’ environment variable to ‘’ (empty string) or leaving it unset.

Any other value are invalid, and will make IPython exit with a non-zero return code.


Whether to overwrite existing config files when copying


The IPython profile to use.


alias of ProfileAwareConfigLoader


auto generate default config file, and stage it into the profile.


Create a massive crash report when IPython encounters what may be an internal error. The default is to append a short message to the usual traceback