ID EN
Traceback

print_stack

Python 3.11

Print up to limit stack trace entries (starting from the invocation point) if limit is positive. Otherwise, print the last abs(limit) entries. If limit is omitted or None, all entries are printed. The optional f argument can be used to specify an alternate stack frame to start. The optional file argument has the same meaning as for print_tb().

Syntax

PYTHON
traceback.print_stack(f=None, limit=None, file=None)

See Also

stack frame print_tb()