Print the list of tuples as returned by extract_tb() or extract_stack() as a formatted stack trace to the given file.
(extracted_list, file=None)
| 27 | |
| 28 | |
| 29 | def print_list(extracted_list, file=None): |
| 30 | """Print the list of tuples as returned by extract_tb() or |
| 31 | extract_stack() as a formatted stack trace to the given file.""" |
| 32 | if file is None: |
| 33 | file = sys.stderr |
| 34 | for item in StackSummary.from_list(extracted_list).format(): |
| 35 | print(item, file=file, end="") |
| 36 | |
| 37 | def format_list(extracted_list): |
| 38 | """Format a list of tuples or FrameSummary objects for printing. |
no test coverage detected