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)
| 62 | # |
| 63 | |
| 64 | def print_tb(tb, limit=None, file=None): |
| 65 | """Print up to 'limit' stack trace entries from the traceback 'tb'. |
| 66 | |
| 67 | If 'limit' is omitted or None, all entries are printed. If 'file' |
| 68 | is omitted or None, the output goes to sys.stderr; otherwise |
| 69 | 'file' should be an open file or file-like object with a write() |
| 70 | method. |
| 71 | """ |
| 72 | print_list(extract_tb(tb, limit=limit), file=file) |
| 73 | |
| 74 | def format_tb(tb, limit=None): |
| 75 | """A shorthand for 'format_list(extract_tb(tb, limit))'.""" |
searching dependent graphs…