bundles / IPython 9.13.0 / IPython / core / history / HistoryAccessor / get_range_by_str
function
IPython.core.history:HistoryAccessor.get_range_by_str
source: /IPython/core/history.py :573
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: strA 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
%historyfor the full details.raw, output: boolAs get_range
Returns
: Tuples as :meth:`get_range`
Aliases
-
IPython.core.history.HistoryAccessor.get_range_by_str