Warning
This documentation covers a development version of IPython. The development version may differ significantly from the latest stable release.
Important
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).
Terminal IPython options¶
- InteractiveShellApp.code_to_run¶
Execute the given command string.
- Trait type
Unicode
- CLI option
-c
- InteractiveShellApp.exec_PYTHONSTARTUP¶
Run the file referenced by the PYTHONSTARTUP environment variable at IPython startup.
- Trait type
Bool
- Default
True
- InteractiveShellApp.exec_files¶
List of files to run at IPython startup.
- Trait type
List
- InteractiveShellApp.exec_lines¶
lines of code to run at IPython startup.
- Trait type
List
- InteractiveShellApp.extensions¶
A list of dotted module names of IPython extensions to load.
- Trait type
List
- InteractiveShellApp.extra_extensions¶
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.
- Trait type
List
- CLI option
--ext
- InteractiveShellApp.file_to_run¶
A file to be run
- Trait type
Unicode
- InteractiveShellApp.gui¶
Enable GUI event loop integration with any of (‘asyncio’, ‘glut’, ‘gtk’, ‘gtk2’, ‘gtk3’, ‘gtk4’, ‘osx’, ‘pyglet’, ‘qt’, ‘qt5’, ‘qt6’, ‘tk’, ‘wx’, ‘gtk2’, ‘qt4’).
- Options
'asyncio'
,'glut'
,'gtk'
,'gtk2'
,'gtk3'
,'gtk4'
,'osx'
,'pyglet'
,'qt'
,'qt5'
,'qt6'
,'tk'
,'wx'
,'gtk2'
,'qt4'
- CLI option
--gui
- InteractiveShellApp.hide_initial_ns¶
Should variables loaded at startup (by startup files, exec_lines, etc.) be hidden from tools like %who?
- Trait type
Bool
- Default
True
- InteractiveShellApp.ignore_cwd¶
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.
- Trait type
Bool
- Default
False
- CLI option
--ignore-cwd
- InteractiveShellApp.matplotlib¶
Configure matplotlib for interactive use with the default matplotlib backend.
- Options
'auto'
,'agg'
,'gtk'
,'gtk3'
,'gtk4'
,'inline'
,'ipympl'
,'nbagg'
,'notebook'
,'osx'
,'pdf'
,'ps'
,'qt'
,'qt4'
,'qt5'
,'qt6'
,'svg'
,'tk'
,'webagg'
,'widget'
,'wx'
- CLI option
--matplotlib
- InteractiveShellApp.module_to_run¶
Run the module as a script.
- Trait type
Unicode
- CLI option
-m
- InteractiveShellApp.pylab¶
Pre-load matplotlib and numpy for interactive use, selecting a particular matplotlib backend and loop integration.
- Options
'auto'
,'agg'
,'gtk'
,'gtk3'
,'gtk4'
,'inline'
,'ipympl'
,'nbagg'
,'notebook'
,'osx'
,'pdf'
,'ps'
,'qt'
,'qt4'
,'qt5'
,'qt6'
,'svg'
,'tk'
,'webagg'
,'widget'
,'wx'
- CLI option
--pylab
- InteractiveShellApp.pylab_import_all¶
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.
- Trait type
Bool
- Default
True
- InteractiveShellApp.reraise_ipython_extension_failures¶
Reraise exceptions encountered loading IPython extensions?
- Trait type
Bool
- Default
False
- Application.log_datefmt¶
The date format used by logging formatters for %(asctime)s
- Trait type
Unicode
- Default
'%Y-%m-%d %H:%M:%S'
- Application.log_format¶
The Logging format template
- Trait type
Unicode
- Default
'[%(name)s]%(highlevel)s %(message)s'
- Application.log_level¶
Set the log level by value or name.
- Options
0
,10
,20
,30
,40
,50
,'DEBUG'
,'INFO'
,'WARN'
,'ERROR'
,'CRITICAL'
- Default
30
- CLI option
--log-level
- Application.logging_config¶
Configure additional log handlers.
The default stderr logs handler is configured by the log_level, log_datefmt and log_format settings.
This configuration can be used to configure additional handlers (e.g. to output the log to a file) or for finer control over the default handlers.
If provided this should be a logging configuration dictionary, for more information see: https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
This dictionary is merged with the base logging configuration which defines the following:
A logging formatter intended for interactive use called
console
.A logging handler that writes to stderr called
console
which uses the formatterconsole
.A logger with the name of this application set to
DEBUG
level.
This example adds a new handler that writes to a file:
c.Application.logging_config = { 'handlers': { 'file': { 'class': 'logging.FileHandler', 'level': 'DEBUG', 'filename': '<path/to/file>', } }, 'loggers': { '<application-name>': { 'level': 'DEBUG', # NOTE: if you don't list the default "console" # handler here then it will be disabled 'handlers': ['console', 'file'], }, } }
- Trait type
Dict
- Application.show_config¶
Instead of starting the Application, dump configuration to stdout
- Trait type
Bool
- Default
False
- CLI option
--show-config
- Application.show_config_json¶
Instead of starting the Application, dump configuration to stdout (as JSON)
- Trait type
Bool
- Default
False
- CLI option
--show-config-json
- BaseIPythonApplication.add_ipython_dir_to_sys_path¶
No description
- Trait type
Bool
- Default
False
- BaseIPythonApplication.auto_create¶
Whether to create profile dir if it doesn’t exist
- Trait type
Bool
- Default
False
- BaseIPythonApplication.copy_config_files¶
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.
- Trait type
Bool
- Default
False
- BaseIPythonApplication.extra_config_file¶
Path to an extra config file to load.
If specified, load this config file in addition to any other IPython config.
- Trait type
Unicode
- CLI option
--config
- BaseIPythonApplication.ipython_dir¶
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.
- Trait type
Unicode
- CLI option
--ipython-dir
- BaseIPythonApplication.log_datefmt¶
The date format used by logging formatters for %(asctime)s
- Trait type
Unicode
- Default
'%Y-%m-%d %H:%M:%S'
- BaseIPythonApplication.log_format¶
The Logging format template
- Trait type
Unicode
- Default
'[%(name)s]%(highlevel)s %(message)s'
- BaseIPythonApplication.log_level¶
Set the log level by value or name.
- Options
0
,10
,20
,30
,40
,50
,'DEBUG'
,'INFO'
,'WARN'
,'ERROR'
,'CRITICAL'
- Default
30
- BaseIPythonApplication.logging_config¶
Configure additional log handlers.
The default stderr logs handler is configured by the log_level, log_datefmt and log_format settings.
This configuration can be used to configure additional handlers (e.g. to output the log to a file) or for finer control over the default handlers.
If provided this should be a logging configuration dictionary, for more information see: https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
This dictionary is merged with the base logging configuration which defines the following:
A logging formatter intended for interactive use called
console
.A logging handler that writes to stderr called
console
which uses the formatterconsole
.A logger with the name of this application set to
DEBUG
level.
This example adds a new handler that writes to a file:
c.Application.logging_config = { 'handlers': { 'file': { 'class': 'logging.FileHandler', 'level': 'DEBUG', 'filename': '<path/to/file>', } }, 'loggers': { '<application-name>': { 'level': 'DEBUG', # NOTE: if you don't list the default "console" # handler here then it will be disabled 'handlers': ['console', 'file'], }, } }
- Trait type
Dict
- BaseIPythonApplication.overwrite¶
Whether to overwrite existing config files when copying
- Trait type
Bool
- Default
False
- BaseIPythonApplication.profile¶
The IPython profile to use.
- Trait type
Unicode
- Default
'default'
- CLI option
--profile
- BaseIPythonApplication.show_config¶
Instead of starting the Application, dump configuration to stdout
- Trait type
Bool
- Default
False
- BaseIPythonApplication.show_config_json¶
Instead of starting the Application, dump configuration to stdout (as JSON)
- Trait type
Bool
- Default
False
- BaseIPythonApplication.verbose_crash¶
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
- Trait type
Bool
- Default
False
- TerminalIPythonApp.add_ipython_dir_to_sys_path¶
No description
- Trait type
Bool
- Default
False
- TerminalIPythonApp.code_to_run¶
Execute the given command string.
- Trait type
Unicode
- TerminalIPythonApp.copy_config_files¶
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.
- Trait type
Bool
- Default
False
- TerminalIPythonApp.display_banner¶
Whether to display a banner upon starting IPython.
- Trait type
Bool
- Default
True
- CLI option
--banner
- TerminalIPythonApp.exec_PYTHONSTARTUP¶
Run the file referenced by the PYTHONSTARTUP environment variable at IPython startup.
- Trait type
Bool
- Default
True
- TerminalIPythonApp.exec_files¶
List of files to run at IPython startup.
- Trait type
List
- TerminalIPythonApp.exec_lines¶
lines of code to run at IPython startup.
- Trait type
List
- TerminalIPythonApp.extensions¶
A list of dotted module names of IPython extensions to load.
- Trait type
List
- TerminalIPythonApp.extra_config_file¶
Path to an extra config file to load.
If specified, load this config file in addition to any other IPython config.
- Trait type
Unicode
- TerminalIPythonApp.extra_extensions¶
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.
- Trait type
List
- TerminalIPythonApp.file_to_run¶
A file to be run
- Trait type
Unicode
- TerminalIPythonApp.force_interact¶
If a command or file is given via the command-line, e.g. ‘ipython foo.py’, start an interactive shell after executing the file or command.
- Trait type
Bool
- Default
False
- CLI option
-i
- TerminalIPythonApp.gui¶
Enable GUI event loop integration with any of (‘asyncio’, ‘glut’, ‘gtk’, ‘gtk2’, ‘gtk3’, ‘gtk4’, ‘osx’, ‘pyglet’, ‘qt’, ‘qt5’, ‘qt6’, ‘tk’, ‘wx’, ‘gtk2’, ‘qt4’).
- Options
'asyncio'
,'glut'
,'gtk'
,'gtk2'
,'gtk3'
,'gtk4'
,'osx'
,'pyglet'
,'qt'
,'qt5'
,'qt6'
,'tk'
,'wx'
,'gtk2'
,'qt4'
- TerminalIPythonApp.hide_initial_ns¶
Should variables loaded at startup (by startup files, exec_lines, etc.) be hidden from tools like %who?
- Trait type
Bool
- Default
True
- TerminalIPythonApp.ignore_cwd¶
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.
- Trait type
Bool
- Default
False
- TerminalIPythonApp.interactive_shell_class¶
Class to use to instantiate the TerminalInteractiveShell object. Useful for custom Frontends
- Trait type
Type
- Default
'IPython.terminal.interactiveshell.TerminalInteractiveShell'
- TerminalIPythonApp.ipython_dir¶
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.
- Trait type
Unicode
- TerminalIPythonApp.log_datefmt¶
The date format used by logging formatters for %(asctime)s
- Trait type
Unicode
- Default
'%Y-%m-%d %H:%M:%S'
- TerminalIPythonApp.log_format¶
The Logging format template
- Trait type
Unicode
- Default
'[%(name)s]%(highlevel)s %(message)s'
- TerminalIPythonApp.log_level¶
Set the log level by value or name.
- Options
0
,10
,20
,30
,40
,50
,'DEBUG'
,'INFO'
,'WARN'
,'ERROR'
,'CRITICAL'
- Default
30
- TerminalIPythonApp.logging_config¶
Configure additional log handlers.
The default stderr logs handler is configured by the log_level, log_datefmt and log_format settings.
This configuration can be used to configure additional handlers (e.g. to output the log to a file) or for finer control over the default handlers.
If provided this should be a logging configuration dictionary, for more information see: https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
This dictionary is merged with the base logging configuration which defines the following:
A logging formatter intended for interactive use called
console
.A logging handler that writes to stderr called
console
which uses the formatterconsole
.A logger with the name of this application set to
DEBUG
level.
This example adds a new handler that writes to a file:
c.Application.logging_config = { 'handlers': { 'file': { 'class': 'logging.FileHandler', 'level': 'DEBUG', 'filename': '<path/to/file>', } }, 'loggers': { '<application-name>': { 'level': 'DEBUG', # NOTE: if you don't list the default "console" # handler here then it will be disabled 'handlers': ['console', 'file'], }, } }
- Trait type
Dict
- TerminalIPythonApp.matplotlib¶
Configure matplotlib for interactive use with the default matplotlib backend.
- Options
'auto'
,'agg'
,'gtk'
,'gtk3'
,'gtk4'
,'inline'
,'ipympl'
,'nbagg'
,'notebook'
,'osx'
,'pdf'
,'ps'
,'qt'
,'qt4'
,'qt5'
,'qt6'
,'svg'
,'tk'
,'webagg'
,'widget'
,'wx'
- TerminalIPythonApp.module_to_run¶
Run the module as a script.
- Trait type
Unicode
- TerminalIPythonApp.overwrite¶
Whether to overwrite existing config files when copying
- Trait type
Bool
- Default
False
- TerminalIPythonApp.profile¶
The IPython profile to use.
- Trait type
Unicode
- Default
'default'
- TerminalIPythonApp.pylab¶
Pre-load matplotlib and numpy for interactive use, selecting a particular matplotlib backend and loop integration.
- Options
'auto'
,'agg'
,'gtk'
,'gtk3'
,'gtk4'
,'inline'
,'ipympl'
,'nbagg'
,'notebook'
,'osx'
,'pdf'
,'ps'
,'qt'
,'qt4'
,'qt5'
,'qt6'
,'svg'
,'tk'
,'webagg'
,'widget'
,'wx'
- TerminalIPythonApp.pylab_import_all¶
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.
- Trait type
Bool
- Default
True
- TerminalIPythonApp.quick¶
Start IPython quickly by skipping the loading of config files.
- Trait type
Bool
- Default
False
- CLI option
--quick
- TerminalIPythonApp.reraise_ipython_extension_failures¶
Reraise exceptions encountered loading IPython extensions?
- Trait type
Bool
- Default
False
- TerminalIPythonApp.show_config¶
Instead of starting the Application, dump configuration to stdout
- Trait type
Bool
- Default
False
- TerminalIPythonApp.show_config_json¶
Instead of starting the Application, dump configuration to stdout (as JSON)
- Trait type
Bool
- Default
False
- TerminalIPythonApp.verbose_crash¶
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
- Trait type
Bool
- Default
False
- InteractiveShell.ast_node_interactivity¶
‘all’, ‘last’, ‘last_expr’ or ‘none’, ‘last_expr_or_assign’ specifying which nodes should be run interactively (displaying output from expressions).
- Options
'all'
,'last'
,'last_expr'
,'none'
,'last_expr_or_assign'
- Default
'last_expr'
- InteractiveShell.ast_transformers¶
A list of ast.NodeTransformer subclass instances, which will be applied to user input before code is run.
- Trait type
List
- InteractiveShell.autoawait¶
Automatically run await statement in the top level repl.
- Trait type
Bool
- Default
True
- InteractiveShell.autocall¶
Make IPython automatically call any callable object even if you didn’t type explicit parentheses. For example, ‘str 43’ becomes ‘str(43)’ automatically. The value can be ‘0’ to disable the feature, ‘1’ for ‘smart’ autocall, where it is not applied if there are no more arguments on the line, and ‘2’ for ‘full’ autocall, where all callable objects are automatically called (even if no arguments are present).
- Options
0
,1
,2
- Default
0
- CLI option
--autocall
- InteractiveShell.autoindent¶
Autoindent IPython code entered interactively.
- Trait type
Bool
- Default
True
- CLI option
--autoindent
- InteractiveShell.automagic¶
Enable magic commands to be called without the leading %.
- Trait type
Bool
- Default
True
- CLI option
--automagic
- InteractiveShell.banner1¶
The part of the banner to be printed before the profile
- Trait type
Unicode
- Default
"Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022...
- InteractiveShell.banner2¶
The part of the banner to be printed after the profile
- Trait type
Unicode
- InteractiveShell.cache_size¶
Set the size of the output cache. The default is 1000, you can change it permanently in your config file. Setting it to 0 completely disables the caching system, and the minimum value accepted is 3 (if you provide a value less than 3, it is reset to 0 and a warning is issued). This limit is defined because otherwise you’ll spend more time re-flushing a too small cache than working
- Trait type
Int
- Default
1000
- CLI option
--cache-size
- InteractiveShell.color_info¶
Use colors for displaying information about objects. Because this information is passed through a pager (like ‘less’), and some pagers get confused with color codes, this capability can be turned off.
- Trait type
Bool
- Default
True
- CLI option
--color-info
- InteractiveShell.colors¶
Set the color scheme (NoColor, Neutral, Linux, or LightBG).
- Options
'Neutral'
,'NoColor'
,'LightBG'
,'Linux'
- Default
'Neutral'
- CLI option
--colors
- InteractiveShell.debug¶
No description
- Trait type
Bool
- Default
False
- InteractiveShell.disable_failing_post_execute¶
Don’t call post-execute functions that have failed in the past.
- Trait type
Bool
- Default
False
- InteractiveShell.display_page¶
If True, anything that would be passed to the pager will be displayed as regular output instead.
- Trait type
Bool
- Default
False
- InteractiveShell.enable_html_pager¶
(Provisional API) enables html representation in mime bundles sent to pagers.
- Trait type
Bool
- Default
False
- InteractiveShell.history_length¶
Total length of command history
- Trait type
Int
- Default
10000
- InteractiveShell.history_load_length¶
The number of saved history entries to be loaded into the history buffer at startup.
- Trait type
Int
- Default
1000
- InteractiveShell.inspector_class¶
Class to use to instantiate the shell inspector
- Trait type
Type
- Default
'IPython.core.oinspect.Inspector'
- InteractiveShell.ipython_dir¶
No description
- Trait type
Unicode
- InteractiveShell.logappend¶
Start logging to the given file in append mode. Use
logfile
to specify a log file to overwrite logs to.- Trait type
Unicode
- CLI option
--logappend
- InteractiveShell.logfile¶
The name of the logfile to use.
- Trait type
Unicode
- CLI option
--logfile
- InteractiveShell.logstart¶
Start logging to the default log file in overwrite mode. Use
logappend
to specify a log file to append logs to.- Trait type
Bool
- Default
False
- InteractiveShell.loop_runner¶
Select the loop runner that will be used to execute top-level asynchronous code
- Trait type
Any
- Default
'IPython.core.interactiveshell._asyncio_runner'
- InteractiveShell.object_info_string_level¶
No description
- Options
0
,1
,2
- Default
0
- InteractiveShell.pdb¶
Automatically call the pdb debugger after every exception.
- Trait type
Bool
- Default
False
- CLI option
--pdb
- InteractiveShell.quiet¶
No description
- Trait type
Bool
- Default
False
- InteractiveShell.separate_in¶
No description
- Trait type
SeparateUnicode
- Default
'\\n'
- InteractiveShell.separate_out¶
No description
- Trait type
SeparateUnicode
- InteractiveShell.separate_out2¶
No description
- Trait type
SeparateUnicode
- InteractiveShell.show_rewritten_input¶
Show rewritten input, e.g. for autocall.
- Trait type
Bool
- Default
True
- InteractiveShell.sphinxify_docstring¶
Enables rich html representation of docstrings. (This requires the docrepr module).
- Trait type
Bool
- Default
False
- InteractiveShell.warn_venv¶
Warn if running in a virtual environment with no IPython installed (so IPython from the global environment is used).
- Trait type
Bool
- Default
True
- InteractiveShell.wildcards_case_sensitive¶
No description
- Trait type
Bool
- Default
True
- InteractiveShell.xmode¶
Switch modes for the IPython exception handlers.
- Options
'Context'
,'Plain'
,'Verbose'
,'Minimal'
- Default
'Context'
- TerminalInteractiveShell.ast_node_interactivity¶
‘all’, ‘last’, ‘last_expr’ or ‘none’, ‘last_expr_or_assign’ specifying which nodes should be run interactively (displaying output from expressions).
- Options
'all'
,'last'
,'last_expr'
,'none'
,'last_expr_or_assign'
- Default
'last_expr'
- TerminalInteractiveShell.ast_transformers¶
A list of ast.NodeTransformer subclass instances, which will be applied to user input before code is run.
- Trait type
List
- TerminalInteractiveShell.auto_match¶
Automatically add/delete closing bracket or quote when opening bracket or quote is entered/deleted. Brackets: (), [], {} Quotes: ‘’, “”
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.autoawait¶
Automatically run await statement in the top level repl.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.autocall¶
Make IPython automatically call any callable object even if you didn’t type explicit parentheses. For example, ‘str 43’ becomes ‘str(43)’ automatically. The value can be ‘0’ to disable the feature, ‘1’ for ‘smart’ autocall, where it is not applied if there are no more arguments on the line, and ‘2’ for ‘full’ autocall, where all callable objects are automatically called (even if no arguments are present).
- Options
0
,1
,2
- Default
0
- TerminalInteractiveShell.autoformatter¶
Autoformatter to reformat Terminal code. Can be
'black'
,'yapf'
orNone
- Trait type
Unicode
- TerminalInteractiveShell.autoindent¶
Autoindent IPython code entered interactively.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.automagic¶
Enable magic commands to be called without the leading %.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.autosuggestions_provider¶
Specifies from which source automatic suggestions are provided. Can be set to
'NavigableAutoSuggestFromHistory'
(up and down swap suggestions),'AutoSuggestFromHistory'
, orNone
to disable automatic suggestions. Default is'NavigableAutoSuggestFromHistory
’.- Trait type
Unicode
- Default
'NavigableAutoSuggestFromHistory'
- TerminalInteractiveShell.banner1¶
The part of the banner to be printed before the profile
- Trait type
Unicode
- Default
"Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022...
- TerminalInteractiveShell.banner2¶
The part of the banner to be printed after the profile
- Trait type
Unicode
- TerminalInteractiveShell.cache_size¶
Set the size of the output cache. The default is 1000, you can change it permanently in your config file. Setting it to 0 completely disables the caching system, and the minimum value accepted is 3 (if you provide a value less than 3, it is reset to 0 and a warning is issued). This limit is defined because otherwise you’ll spend more time re-flushing a too small cache than working
- Trait type
Int
- Default
1000
- TerminalInteractiveShell.color_info¶
Use colors for displaying information about objects. Because this information is passed through a pager (like ‘less’), and some pagers get confused with color codes, this capability can be turned off.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.colors¶
Set the color scheme (NoColor, Neutral, Linux, or LightBG).
- Options
'Neutral'
,'NoColor'
,'LightBG'
,'Linux'
- Default
'Neutral'
- TerminalInteractiveShell.confirm_exit¶
Set to confirm when you try to exit IPython with an EOF (Control-D in Unix, Control-Z/Enter in Windows). By typing ‘exit’ or ‘quit’, you can force a direct exit without any confirmation.
- Trait type
Bool
- Default
True
- CLI option
--confirm-exit
- TerminalInteractiveShell.debug¶
No description
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.debugger_history_file¶
File in which to store and read history
- Trait type
Unicode
- Default
'~/.pdbhistory'
- TerminalInteractiveShell.disable_failing_post_execute¶
Don’t call post-execute functions that have failed in the past.
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.display_completions¶
Options for displaying tab completions, ‘column’, ‘multicolumn’, and ‘readlinelike’. These options are for
prompt_toolkit
, seeprompt_toolkit
documentation for more information.- Options
'column'
,'multicolumn'
,'readlinelike'
- Default
'multicolumn'
- TerminalInteractiveShell.display_page¶
If True, anything that would be passed to the pager will be displayed as regular output instead.
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.editing_mode¶
Shortcut style to use at the prompt. ‘vi’ or ‘emacs’.
- Trait type
Unicode
- Default
'emacs'
- TerminalInteractiveShell.editor¶
Set the editor used by IPython (default to $EDITOR/vi/notepad).
- Trait type
Unicode
- Default
'vi'
- TerminalInteractiveShell.emacs_bindings_in_vi_insert_mode¶
Add shortcuts from ‘emacs’ insert mode to ‘vi’ insert mode.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.enable_history_search¶
Allows to enable/disable the prompt toolkit history search
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.enable_html_pager¶
(Provisional API) enables html representation in mime bundles sent to pagers.
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.extra_open_editor_shortcuts¶
Enable vi (v) or Emacs (C-X C-E) shortcuts to open an external editor. This is in addition to the F2 binding, which is always enabled.
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.handle_return¶
Provide an alternative handler to be called when the user presses Return. This is an advanced option intended for debugging, which may be changed or removed in later releases.
- Trait type
Any
- TerminalInteractiveShell.highlight_matching_brackets¶
Highlight matching brackets.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.highlighting_style¶
The name or class of a Pygments style to use for syntax highlighting. To see available styles, run
pygmentize -L styles
.- Trait type
Union
- TerminalInteractiveShell.highlighting_style_overrides¶
Override highlighting format for specific tokens
- Trait type
Dict
- TerminalInteractiveShell.history_length¶
Total length of command history
- Trait type
Int
- Default
10000
- TerminalInteractiveShell.history_load_length¶
The number of saved history entries to be loaded into the history buffer at startup.
- Trait type
Int
- Default
1000
- TerminalInteractiveShell.inspector_class¶
Class to use to instantiate the shell inspector
- Trait type
Type
- Default
'IPython.core.oinspect.Inspector'
- TerminalInteractiveShell.ipython_dir¶
No description
- Trait type
Unicode
- TerminalInteractiveShell.logappend¶
Start logging to the given file in append mode. Use
logfile
to specify a log file to overwrite logs to.- Trait type
Unicode
- TerminalInteractiveShell.logfile¶
The name of the logfile to use.
- Trait type
Unicode
- TerminalInteractiveShell.logstart¶
Start logging to the default log file in overwrite mode. Use
logappend
to specify a log file to append logs to.- Trait type
Bool
- Default
False
- TerminalInteractiveShell.loop_runner¶
Select the loop runner that will be used to execute top-level asynchronous code
- Trait type
Any
- Default
'IPython.core.interactiveshell._asyncio_runner'
- TerminalInteractiveShell.mime_renderers¶
No description
- Trait type
Dict
- TerminalInteractiveShell.modal_cursor¶
Cursor shape changes depending on vi mode: beam in vi insert mode, block in nav mode, underscore in replace mode.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.mouse_support¶
Enable mouse support in the prompt (Note: prevents selecting text with the mouse)
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.object_info_string_level¶
No description
- Options
0
,1
,2
- Default
0
- TerminalInteractiveShell.pdb¶
Automatically call the pdb debugger after every exception.
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.prompt_includes_vi_mode¶
Display the current vi mode (when using vi editing mode).
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.prompts_class¶
Class used to generate Prompt token for prompt_toolkit
- Trait type
Type
- Default
'IPython.terminal.prompts.Prompts'
- TerminalInteractiveShell.quiet¶
No description
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.separate_in¶
No description
- Trait type
SeparateUnicode
- Default
'\\n'
- TerminalInteractiveShell.separate_out¶
No description
- Trait type
SeparateUnicode
- TerminalInteractiveShell.separate_out2¶
No description
- Trait type
SeparateUnicode
- TerminalInteractiveShell.shortcuts¶
Add, disable or modifying shortcuts.
Each entry on the list should be a dictionary with
command
key identifying the target function executed by the shortcut and at least one of the following:match_keys
: list of keys used to match an existing shortcut,match_filter
: shortcut filter used to match an existing shortcut,new_keys
: list of keys to set,new_filter
: a new shortcut filter to set
The filters have to be composed of pre-defined verbs and joined by one of the following conjunctions:
&
(and),|
(or),~
(not). The pre-defined verbs are:always
never
has_line_below
has_line_above
is_cursor_at_the_end_of_line
has_selection
has_suggestion
vi_mode
vi_insert_mode
emacs_insert_mode
emacs_like_insert_mode
has_completions
insert_mode
default_buffer_focused
search_buffer_focused
ebivim
supports_suspend
is_windows_os
auto_match
focused_insert
not_inside_unclosed_string
readline_like_completions
preceded_by_paired_double_quotes
preceded_by_paired_single_quotes
preceded_by_raw_str_prefix
preceded_by_two_double_quotes
preceded_by_two_single_quotes
followed_by_closing_paren_or_end
preceded_by_opening_round_paren
preceded_by_opening_bracket
preceded_by_opening_brace
preceded_by_double_quote
preceded_by_single_quote
followed_by_closing_round_paren
followed_by_closing_bracket
followed_by_closing_brace
followed_by_double_quote
followed_by_single_quote
navigable_suggestions
cursor_in_leading_ws
pass_through
To disable a shortcut set
new_keys
to an empty list. To add a shortcut add keycreate
with valueTrue
.When modifying/disabling shortcuts,
match_keys
/match_filter
can be omitted if the provided specification uniquely identifies a shortcut to be modified/disabled. When modifying a shortcutnew_filter
ornew_keys
can be omitted which will result in reuse of the existing filter/keys.Only shortcuts defined in IPython (and not default prompt-toolkit shortcuts) can be modified or disabled. The full list of shortcuts, command identifiers and filters is available under IPython shortcuts.
- Trait type
List
- TerminalInteractiveShell.show_rewritten_input¶
Show rewritten input, e.g. for autocall.
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.simple_prompt¶
Use
raw_input
for the REPL, without completion and prompt colors.Useful when controlling IPython as a subprocess, and piping STDIN/OUT/ERR. Known usage are: IPython own testing machinery, and emacs inferior-shell integration through elpy.
This mode default to
True
if theIPY_TEST_SIMPLE_PROMPT
environment variable is set, or the current terminal is not a tty.- Trait type
Bool
- Default
True
- CLI option
--simple-prompt
Number of line at the bottom of the screen to reserve for the tab completion menu, search history, …etc, the height of these menus will at most this value. Increase it is you prefer long and skinny menus, decrease for short and wide.
- Trait type
Int
- Default
6
- TerminalInteractiveShell.sphinxify_docstring¶
Enables rich html representation of docstrings. (This requires the docrepr module).
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.term_title¶
Automatically set the terminal title
- Trait type
Bool
- Default
True
- CLI option
--term-title
- TerminalInteractiveShell.term_title_format¶
Customize the terminal title format. This is a python format string. Available substitutions are: {cwd}.
- Trait type
Unicode
- Default
'IPython: {cwd}'
- TerminalInteractiveShell.timeoutlen¶
The time in milliseconds that is waited for a mapped key sequence to complete.
- Trait type
Float
- Default
0.5
- TerminalInteractiveShell.true_color¶
Use 24bit colors instead of 256 colors in prompt highlighting. If your terminal supports true color, the following command should print
TRUECOLOR
in orange:printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"
- Trait type
Bool
- Default
False
- TerminalInteractiveShell.ttimeoutlen¶
The time in milliseconds that is waited for a key code to complete.
- Trait type
Float
- Default
0.01
- TerminalInteractiveShell.warn_venv¶
Warn if running in a virtual environment with no IPython installed (so IPython from the global environment is used).
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.wildcards_case_sensitive¶
No description
- Trait type
Bool
- Default
True
- TerminalInteractiveShell.xmode¶
Switch modes for the IPython exception handlers.
- Options
'Context'
,'Plain'
,'Verbose'
,'Minimal'
- Default
'Context'
- HistoryAccessor.connection_options¶
Options for configuring the SQLite connection
These options are passed as keyword args to sqlite3.connect when establishing database connections.
- Trait type
Dict
- HistoryAccessor.enabled¶
enable the SQLite history
set enabled=False to disable the SQLite history, in which case there will be no stored history, no SQLite connection, and no background saving thread. This may be necessary in some threaded environments where IPython is embedded.
- Trait type
Bool
- Default
True
- HistoryAccessor.hist_file¶
Path to file to use for SQLite history database.
By default, IPython will put the history database in the IPython profile directory. If you would rather share one history among profiles, you can set this value in each, so that they are consistent.
Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts. If you see IPython hanging, try setting this to something on a local disk, e.g:
ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
you can also use the specific value
:memory:
(including the colon at both end but not the back ticks), to avoid creating an history file.- Trait type
Union
- HistoryManager.connection_options¶
Options for configuring the SQLite connection
These options are passed as keyword args to sqlite3.connect when establishing database connections.
- Trait type
Dict
- HistoryManager.db_cache_size¶
Write to database every x commands (higher values save disk access & power). Values of 1 or less effectively disable caching.
- Trait type
Int
- Default
0
- HistoryManager.db_log_output¶
Should the history database include output? (default: no)
- Trait type
Bool
- Default
False
- HistoryManager.enabled¶
enable the SQLite history
set enabled=False to disable the SQLite history, in which case there will be no stored history, no SQLite connection, and no background saving thread. This may be necessary in some threaded environments where IPython is embedded.
- Trait type
Bool
- Default
True
- HistoryManager.hist_file¶
Path to file to use for SQLite history database.
By default, IPython will put the history database in the IPython profile directory. If you would rather share one history among profiles, you can set this value in each, so that they are consistent.
Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts. If you see IPython hanging, try setting this to something on a local disk, e.g:
ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
you can also use the specific value
:memory:
(including the colon at both end but not the back ticks), to avoid creating an history file.- Trait type
Union
- MagicsManager.auto_magic¶
Automatically call line magics without requiring explicit % prefix
- Trait type
Bool
- Default
True
- MagicsManager.lazy_magics¶
Mapping from magic names to modules to load.
This can be used in IPython/IPykernel configuration to declare lazy magics that will only be imported/registered on first use.
For example:
c.MagicsManager.lazy_magics = { "my_magic": "slow.to.import", "my_other_magic": "also.slow", }
On first invocation of
%my_magic
,%%my_magic
,%%my_other_magic
or%%my_other_magic
, the corresponding module will be loaded as an ipython extensions as if you had previously done%load_ext ipython
.Magics names should be without percent(s) as magics can be both cell and line magics.
Lazy loading happen relatively late in execution process, and complex extensions that manipulate Python/IPython internal state or global state might not support lazy loading.
- Trait type
Dict
- ProfileDir.location¶
Set the profile location directly. This overrides the logic used by the
profile
option.- Trait type
Unicode
- CLI option
--profile-dir
- BaseFormatter.deferred_printers¶
No description
- Trait type
Dict
- BaseFormatter.enabled¶
No description
- Trait type
Bool
- Default
True
- BaseFormatter.singleton_printers¶
No description
- Trait type
Dict
- BaseFormatter.type_printers¶
No description
- Trait type
Dict
- PlainTextFormatter.deferred_printers¶
No description
- Trait type
Dict
- PlainTextFormatter.float_precision¶
No description
- Trait type
CUnicode
- PlainTextFormatter.max_seq_length¶
Truncate large collections (lists, dicts, tuples, sets) to this size.
Set to 0 to disable truncation.
- Trait type
Int
- Default
1000
- PlainTextFormatter.max_width¶
No description
- Trait type
Int
- Default
79
- PlainTextFormatter.newline¶
No description
- Trait type
Unicode
- Default
'\\n'
- PlainTextFormatter.pprint¶
No description
- Trait type
Bool
- Default
True
- CLI option
--pprint
- PlainTextFormatter.singleton_printers¶
No description
- Trait type
Dict
- PlainTextFormatter.type_printers¶
No description
- Trait type
Dict
- PlainTextFormatter.verbose¶
No description
- Trait type
Bool
- Default
False
- Completer.auto_close_dict_keys¶
Enable auto-closing dictionary keys.
When enabled string keys will be suffixed with a final quote (matching the opening quote), tuple keys will also receive a separating comma if needed, and keys which are final will receive a closing bracket (
]
).- Trait type
Bool
- Default
False
- Completer.backslash_combining_completions¶
Enable unicode completions, e.g. alpha<tab> . Includes completion of latex commands, unicode names, and expanding unicode characters back to latex commands.
- Trait type
Bool
- Default
True
- Completer.debug¶
Enable debug for the Completer. Mostly print extra information for experimental jedi integration.
- Trait type
Bool
- Default
False
- Completer.evaluation¶
Policy for code evaluation under completion.
Successive options allow to enable more eager evaluation for better completion suggestions, including for nested dictionaries, nested lists, or even results of function calls. Setting
unsafe
or higher can lead to evaluation of arbitrary user code on Tab with potentially unwanted or dangerous side effects.Allowed values are:
forbidden
: no evaluation of code is permitted,minimal
: evaluation of literals and access to built-in namespace; no item/attribute evaluationm no access to locals/globals, no evaluation of any operations or comparisons.limited
: access to all namespaces, evaluation of hard-coded methods (for example:dict.keys
,object.__getattr__
,object.__getitem__
) on allow-listed objects (for example:dict
,list
,tuple
,pandas.Series
),unsafe
: evaluation of all methods and function calls but not of syntax with side-effects likedel x
,dangerous
: completely arbitrary evaluation.
- Options
'forbidden'
,'minimal'
,'limited'
,'unsafe'
,'dangerous'
- Default
'limited'
- Completer.greedy¶
Activate greedy completion.
Deprecated since version 8.8: Use
Completer.evaluation
andCompleter.auto_close_dict_keys
instead.When enabled in IPython 8.8 or newer, changes configuration as follows:
Completer.evaluation = 'unsafe'
Completer.auto_close_dict_keys = True
- Trait type
Bool
- Default
False
- Completer.jedi_compute_type_timeout¶
Experimental: restrict time (in milliseconds) during which Jedi can compute types. Set to 0 to stop computing types. Non-zero value lower than 100ms may hurt performance by preventing jedi to build its cache.
- Trait type
Int
- Default
400
- Completer.use_jedi¶
Experimental: Use Jedi to generate autocompletions. Default to True if jedi is installed.
- Trait type
Bool
- Default
True
- IPCompleter.auto_close_dict_keys¶
Enable auto-closing dictionary keys.
When enabled string keys will be suffixed with a final quote (matching the opening quote), tuple keys will also receive a separating comma if needed, and keys which are final will receive a closing bracket (
]
).- Trait type
Bool
- Default
False
- IPCompleter.backslash_combining_completions¶
Enable unicode completions, e.g. alpha<tab> . Includes completion of latex commands, unicode names, and expanding unicode characters back to latex commands.
- Trait type
Bool
- Default
True
- IPCompleter.debug¶
Enable debug for the Completer. Mostly print extra information for experimental jedi integration.
- Trait type
Bool
- Default
False
- IPCompleter.disable_matchers¶
List of matchers to disable.
The list should contain matcher identifiers (see
completion_matcher
).- Trait type
List
- IPCompleter.evaluation¶
Policy for code evaluation under completion.
Successive options allow to enable more eager evaluation for better completion suggestions, including for nested dictionaries, nested lists, or even results of function calls. Setting
unsafe
or higher can lead to evaluation of arbitrary user code on Tab with potentially unwanted or dangerous side effects.Allowed values are:
forbidden
: no evaluation of code is permitted,minimal
: evaluation of literals and access to built-in namespace; no item/attribute evaluationm no access to locals/globals, no evaluation of any operations or comparisons.limited
: access to all namespaces, evaluation of hard-coded methods (for example:dict.keys
,object.__getattr__
,object.__getitem__
) on allow-listed objects (for example:dict
,list
,tuple
,pandas.Series
),unsafe
: evaluation of all methods and function calls but not of syntax with side-effects likedel x
,dangerous
: completely arbitrary evaluation.
- Options
'forbidden'
,'minimal'
,'limited'
,'unsafe'
,'dangerous'
- Default
'limited'
- IPCompleter.greedy¶
Activate greedy completion.
Deprecated since version 8.8: Use
Completer.evaluation
andCompleter.auto_close_dict_keys
instead.When enabled in IPython 8.8 or newer, changes configuration as follows:
Completer.evaluation = 'unsafe'
Completer.auto_close_dict_keys = True
- Trait type
Bool
- Default
False
- IPCompleter.jedi_compute_type_timeout¶
Experimental: restrict time (in milliseconds) during which Jedi can compute types. Set to 0 to stop computing types. Non-zero value lower than 100ms may hurt performance by preventing jedi to build its cache.
- Trait type
Int
- Default
400
- IPCompleter.limit_to__all__¶
DEPRECATED as of version 5.0.
Instruct the completer to use __all__ for the completion
Specifically, when completing on
object.<tab>
.When True: only those names in obj.__all__ will be included.
When False [default]: the __all__ attribute is ignored
- Trait type
Bool
- Default
False
- IPCompleter.merge_completions¶
Whether to merge completion results into a single list
If False, only the completion results from the first non-empty completer will be returned.
As of version 8.6.0, setting the value to
False
is an alias for:IPCompleter.suppress_competing_matchers = True.
.- Trait type
Bool
- Default
True
- IPCompleter.omit__names¶
Instruct the completer to omit private method names
Specifically, when completing on
object.<tab>
.When 2 [default]: all names that start with ‘_’ will be excluded.
When 1: all ‘magic’ names (
__foo__
) will be excluded.When 0: nothing will be excluded.
- Options
0
,1
,2
- Default
2
- IPCompleter.profile_completions¶
If True, emit profiling data for completion subsystem using cProfile.
- Trait type
Bool
- Default
False
- IPCompleter.profiler_output_dir¶
Template for path at which to output profile data for completions.
- Trait type
Unicode
- Default
'.completion_profiles'
- IPCompleter.suppress_competing_matchers¶
Whether to suppress completions from other Matchers.
When set to
None
(default) the matchers will attempt to auto-detect whether suppression of other matchers is desirable. For example, at the beginning of a line followed by%
we expect a magic completion to be the only applicable option, and aftermy_dict['
we usually expect a completion with an existing dictionary key.If you want to disable this heuristic and see completions from all matchers, set
IPCompleter.suppress_competing_matchers = False
. To disable the heuristic for specific matchers provide a dictionary mapping:IPCompleter.suppress_competing_matchers = {'IPCompleter.dict_key_matcher': False}
.Set
IPCompleter.suppress_competing_matchers = True
to limit completions to the set of matchers with the highest priority; this is equivalent toIPCompleter.merge_completions
and can be beneficial for performance, but will sometimes omit relevant candidates from matchers further down the priority list.- Trait type
Union
- IPCompleter.use_jedi¶
Experimental: Use Jedi to generate autocompletions. Default to True if jedi is installed.
- Trait type
Bool
- Default
True
- ScriptMagics.script_magics¶
Extra script cell magics to define
This generates simple wrappers of
%%script foo
as%%foo
.If you want to add script magics that aren’t on your path, specify them in script_paths
- Trait type
List
- ScriptMagics.script_paths¶
Dict mapping short ‘ruby’ names to full paths, such as ‘/opt/secret/bin/ruby’
Only necessary for items in script_magics where the default path will not find the right interpreter.
- Trait type
Dict
- LoggingMagics.quiet¶
Suppress output of log state when logging is enabled
- Trait type
Bool
- Default
False
- StoreMagics.autorestore¶
If True, any %store-d variables will be automatically restored when IPython starts.
- Trait type
Bool
- Default
False