### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »

# kernel.core.history

## Module: `kernel.core.history`

Inheritance diagram for `IPython.kernel.core.history`:

Manage the input and output history of the interpreter and the frontend.

There are 2 different history objects, one that lives in the interpreter, and one that lives in the frontend. They are synced with a diff at each execution of a command, as the interpreter history is a real stack, its existing entries are not mutable.

## Classes

### `FrontEndHistory`

class `IPython.kernel.core.history.``FrontEndHistory`(input_cache=None, output_cache=None)

  Bases: `IPython.kernel.core.history.History`

  An object managing the input and output history at the frontend. It is used as a local cache to reduce network latency problems and multiple users editing the same thing.

  `__init__`()
  `add_items`()

    Adds the given command list to the stack of executed commands.

### `History`

class `IPython.kernel.core.history.``History`(input_cache=None, output_cache=None)

  Bases: `object`

  An object managing the input and output history.

  `__init__`()
  `get_history_item`()

    Returns the history string at index, where index is the distance from the end (positive).

### `InterpreterHistory`

class `IPython.kernel.core.history.``InterpreterHistory`(input_cache=None, output_cache=None)

  Bases: `IPython.kernel.core.history.History`

  An object managing the input and output history at the interpreter level.

  `__init__`()
  `get_history_item`()

    Returns the history string at index, where index is the distance from the end (positive).

  `get_input_after`()

    Returns the list of the commands entered after index.

  `get_input_cache`()
  `setup_namespace`()

    Add the input and output caches into the interpreter’s namespace with IPython-conventional names.

    Parameters : | namespace : dict

  `update_history`()

    Update the history objects that this object maintains and the interpreter’s namespace.

    Parameters :

    interpreter : Interpreter

    python : str

    > The real Python code that was translated and actually executed.

### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »