You are viewing an older version (9.10.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.10.0 / IPython / core / history / HistoryAccessor / get_range_by_str

function

IPython.core.history:HistoryAccessor.get_range_by_str

source: /IPython/core/history.py :565

Signature

def   get_range_by_str ( self rangestr : str raw : bool = True output : bool = False )  →  Iterable[tuple[int, int, InOrInOut]]

Summary

Get lines of history from a string of ranges, as used by magic commands %hist, %save, %macro, etc.

Parameters

rangestr : str

A string specifying ranges, e.g. "5 ~2/1-4". If empty string is used, this will return everything from current session's history.

See the documentation of %history for the full details.

raw, output : bool

As get_range

Returns

: Tuples as :meth:`get_range`

Aliases

  • IPython.core.history.HistoryAccessor.get_range_by_str