MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / print_stack

Function print_stack

tools/python-3.11.9-amd64/Lib/traceback.py:198–207  ·  view source on GitHub ↗

Print a stack trace from its invocation point. The optional 'f' argument can be used to specify an alternate stack frame at which to start. The optional 'limit' and 'file' arguments have the same meaning as for print_exception().

(f=None, limit=None, file=None)

Source from the content-addressed store, hash-verified

196#
197
198def print_stack(f=None, limit=None, file=None):
199 """Print a stack trace from its invocation point.
200
201 The optional 'f' argument can be used to specify an alternate
202 stack frame at which to start. The optional 'limit' and 'file'
203 arguments have the same meaning as for print_exception().
204 """
205 if f is None:
206 f = sys._getframe().f_back
207 print_list(extract_stack(f, limit=limit), file=file)
208
209
210def format_stack(f=None, limit=None):

Callers

nothing calls this directly

Calls 2

print_listFunction · 0.85
extract_stackFunction · 0.70

Tested by

no test coverage detected