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

bundles / IPython 9.10.0 / IPython / core / magics / code / extract_code_ranges

function

IPython.core.magics.code:extract_code_ranges

source: /IPython/core/magics/code.py :57

Signature

def   extract_code_ranges ( ranges_str )

Summary

Turn a string of range for %%load into 2-tuples of (start, stop) ready to use as a slice of the content split by lines.

Examples

list(extract_input_ranges("5-10 2")) [(4, 10), (1, 2)]

Aliases

  • IPython.core.magics.code.extract_code_ranges