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

bundles / IPython 9.5.0 / IPython / core / tbtools / _simple_format_traceback_lines

function

IPython.core.tbtools:_simple_format_traceback_lines

source: /IPython/core/tbtools.py :219

Signature

def   _simple_format_traceback_lines ( lnum : int index : int lines : list[tuple[str, tuple[str, bool]]] lvals_toks : list[TokenStream] theme : Theme )  →  TokenStream

Summary

Format tracebacks lines with pointing arrow, leading numbers

Extended Summary

This should be equivalent to _format_traceback_lines, but does not rely on stackdata to format the lines

This is due to the fact that stackdata may be slow on super long and complex files.

Parameters

lnum: int

number of the target line of code.

index: int

which line in the list should be highlighted.

lines: list[string]
lvals_toks: pairs of token type and str

Values of local variables, already colored, to inject just after the error line.

Aliases

  • IPython.core.tbtools._simple_format_traceback_lines