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).
A mixin for
Application classes that
launch InteractiveShell instances, load extensions, etc.
- class IPython.core.shellapp.InteractiveShellApp(**kwargs: Any)¶
A Mixin for applications that start InteractiveShell instances.
Provides configurables for loading extensions and executing files as part of configuring a Shell environment.
The following methods should be called by the
initialize()method of the subclass:
Execute the given command string.
Run the file referenced by the PYTHONSTARTUP environment variable at IPython startup.
List of files to run at IPython startup.
lines of code to run at IPython startup.
A list of dotted module names of IPython extensions to load.
Dotted module name(s) of one or more IPython extensions to load.
For specifying extra extensions to load on the command-line.
New in version 7.10.
A file to be run
Enable GUI event loop integration with any of (‘asyncio’, ‘glut’, ‘gtk’, ‘gtk2’, ‘gtk3’, ‘gtk4’, ‘osx’, ‘pyglet’, ‘qt’, ‘qt5’, ‘qt6’, ‘tk’, ‘wx’, ‘gtk2’, ‘qt4’).
Should variables loaded at startup (by startup files, exec_lines, etc.) be hidden from tools like %who?
If True, IPython will not add the current working directory to sys.path. When False, the current working directory is added to sys.path, allowing imports of modules defined in the current directory.
run the pre-flight code, specified via exec_lines
Load all IPython extensions in IPythonApp.extensions.
This uses the
ExtensionManager.load_extensions()to load all the extensions listed in
Enable GUI event loop integration, taking pylab into account.
Add current working directory, ‘’, to sys.path
Unlike Python’s default, we insert before the first
dist-packagesdirectory, so that it is after the standard library.
Changed in version 7.2: Try to insert after the standard library, instead of first.
Changed in version 8.0: Allow optionally not including the current directory in sys.path
Configure matplotlib for interactive use with the default matplotlib backend.
Run the module as a script.
Pre-load matplotlib and numpy for interactive use, selecting a particular matplotlib backend and loop integration.
If true, IPython will populate the user namespace with numpy, pylab, etc. and an
import *is done from numpy and pylab, when using pylab mode.
When False, pylab mode should not import any names into the user namespace.
Reraise exceptions encountered loading IPython extensions?