ID EN
Traceback

extract_tb

Python 3.11

Return a StackSummary object representing a list of “pre-processed” stack trace entries extracted from the traceback object tb. It is useful for alternate formatting of stack traces. The optional limit argument has the same meaning as for print_tb(). A “pre-processed” stack trace entry is a FrameSummary object containing attributes filename, lineno, name, and line representing the information that is usually printed for a stack trace.

Syntax

PYTHON
traceback.extract_tb(tb, limit=None)

See Also

StackSummary traceback object print_tb() FrameSummary filename lineno name line