MCPcopy Index your code
hub / github.com/RustPython/RustPython / print_tb

Function print_tb

Lib/traceback.py:55–63  ·  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

53#
54
55def print_tb(tb, limit=None, file=None):
56 """Print up to 'limit' stack trace entries from the traceback 'tb'.
57
58 If 'limit' is omitted or None, all entries are printed. If 'file'
59 is omitted or None, the output goes to sys.stderr; otherwise
60 'file' should be an open file or file-like object with a write()
61 method.
62 """
63 print_list(extract_tb(tb, limit=limit), file=file)
64
65def format_tb(tb, limit=None):
66 """A shorthand for 'format_list(extract_tb(tb, limit))'."""

Callers 1

doTracebackMethod · 0.90

Calls 2

print_listFunction · 0.85
extract_tbFunction · 0.85

Tested by 1

doTracebackMethod · 0.72