Previous topic

Next topic

This Page

Quick search

This section contains information about how to configure the
ipython command line application. See the configuration
overview for a more general description of the
configuration system and configuration file format.

The default configuration file for the ipython command line application
is profile_default/ipython_config.py in your IPython directory. By setting the attributes in this file, you can configure the
application. To create the default config file, run this command:

$ ipython profile create

Most configuration attributes that this file accepts are associated with classes
that are subclasses of Configurable.

Applications themselves are Configurable as well, so we will start with some
application-level config.

A boolean that determined if the banner is printer when ipython
is started.

c.TerminalIPythonApp.classic

A boolean that determines if IPython starts in “classic” mode. In this
mode, the prompts and everything mimic that of the normal python
shell

c.TerminalIPythonApp.nosep

A boolean that determines if there should be no blank lines between
prompts.

c.Application.log_level

An integer that sets the detail of the logging level during the startup
of ipython. The default is 30 and the possible values are
(0, 10, 20, 30, 40, 50). Higher is quieter and lower is more verbose.
This can also be set by the name of the logging level, e.g. INFO=20,
WARN=30.

Some options, such as extensions and startup code, can be set for any
application that starts an
InteractiveShell. These apps are
subclasses of InteractiveShellApp. Since
subclasses inherit configuration, setting a trait of
c.InteractiveShellApp will affect all IPython applications, but if you
want terminal IPython and the QtConsole to have different values, you can set
them via c.TerminalIPythonApp and c.IPKernelApp respectively.

c.InteractiveShellApp.extensions

A list of strings, each of which is an importable IPython extension. See
IPython extensions for more details about extensions.

c.InteractiveShellApp.exec_lines

A list of strings, each of which is Python code that is run in the user’s
namespace after IPython start. These lines can contain full IPython syntax
with magics, etc.

c.InteractiveShellApp.exec_files

A list of strings, each of which is the full pathname of a .py or
.ipy file that will be executed as IPython starts. These files are run
in IPython in the user’s namespace. Files with a .py extension need to
be pure Python. Files with a .ipy extension can have custom IPython
syntax (magics, etc.). These files need to be in the cwd, the ipythondir
or be absolute paths.