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

Function print_tb

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

Print up to 'limit' stack trace entries from the traceback 'tb'. If 'limit' is omitted or None, all entries are printed. If 'file' is omitted or None, the output goes to sys.stderr; otherwise 'file' should be an open file or file-like object with a write() method.

(tb, limit=None, file=None)

Source from the content-addressed store, hash-verified

45#
46
47def print_tb(tb, limit=None, file=None):
48 """Print up to 'limit' stack trace entries from the traceback 'tb'.
49
50 If 'limit' is omitted or None, all entries are printed. If 'file'
51 is omitted or None, the output goes to sys.stderr; otherwise
52 'file' should be an open file or file-like object with a write()
53 method.
54 """
55 print_list(extract_tb(tb, limit=limit), file=file)
56
57def format_tb(tb, limit=None):
58 """A shorthand for 'format_list(extract_tb(tb, limit))'."""

Callers

nothing calls this directly

Calls 2

print_listFunction · 0.85
extract_tbFunction · 0.70

Tested by

no test coverage detected