# Module: `qt.console.history_console_widget`

## 1 Class

class `IPython.qt.console.history_console_widget.``HistoryConsoleWidget`(*args, **kw)

  Bases: `IPython.qt.console.console_widget.ConsoleWidget`

  A ConsoleWidget that keeps a history of the commands that have been executed and provides a readline-esque interface to this history.

  `__init__`(*args, **kw)
  `execute`(source=None, hidden=False, interactive=False)

    Reimplemented to the store history.

  `history_next`(substring='', as_prefix=True)

    If possible, set the input buffer to a subsequent history item.

    Parameters:

    substring : str, optional

    > If specified, search for an item with this substring.

    as_prefix : bool, optional

    > If True, the substring must match at the beginning (default).

    Returns: | Whether the input buffer was changed.

  `history_previous`(substring='', as_prefix=True)

    If possible, set the input buffer to a previous history item.

    Parameters:

    substring : str, optional

    > If specified, search for an item with this substring.

    as_prefix : bool, optional

    > If True, the substring must match at the beginning (default).

    Returns: | Whether the input buffer was changed.

  `history_tail`(n=10)

    Get the local history list.

    Parameters:

    n : int

    > The (maximum) number of history items to get.