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.alias

System command aliases.


  • Fernando Perez
  • Brian Granger

4 Classes

class IPython.core.alias.AliasError

Bases: Exception

class IPython.core.alias.InvalidAliasError

Bases: IPython.core.alias.AliasError

class IPython.core.alias.Alias(shell, name, cmd)

Bases: object

Callable object storing the details of one alias.

Instances are registered as magic functions to allow use of aliases.

__init__(shell, name, cmd)

Validate the alias, and return the number of arguments.

class IPython.core.alias.AliasManager(shell=None, **kwargs)

Bases: traitlets.config.configurable.Configurable

__init__(shell=None, **kwargs)
define_alias(name, cmd)

Define a new alias after validating it.

This will raise an AliasError if there are validation problems.


Return an alias, or None if no alias by that name exists.


Return whether or not a given name has been defined as an alias


Retrieve the command to which an alias expands.

soft_define_alias(name, cmd)

Define an alias, but don’t raise on an AliasError.

1 Function


Return list of shell aliases to auto-define.