ID EN
Traceback

print_last

Python 3.11

This is a shorthand for print_exception(sys.last_type, sys.last_value, sys.last_traceback, limit, file, chain). In general it will work only after an exception has reached an interactive prompt (see sys.last_type).

Syntax

PYTHON
traceback.print_last(limit=None, file=None, chain=True)

See Also

sys.last_type