U
e5d;\ ã @ s: d Z ddlZddlZddlZddlZddddddd d
ddd
ddddddddgZd3dd„Zdd„ Zd4dd„Zd5dd „Z d6dd„Z
dZdZd7dd„Z
d8d d„Zd!d„ Zd"d#„ Zd$d%„ Zd9d&d
„Zd:d'd„Zd;d(d
„Zdd+d„Zd,d„ ZG d-d„ dƒZd.d„ Zd/d„ Zd0ZG d1d„ deƒZG d2d„ dƒZdS )?z@Extract, format and print information about Python stack traces.é NÚ
extract_stackÚ
extract_tbÚformat_exceptionÚformat_exception_onlyÚformat_listÚformat_stackÚ format_tbÚ print_excÚ
format_excÚprint_exceptionÚ
print_lastÚprint_stackÚprint_tbÚclear_framesÚFrameSummaryÚStackSummaryÚTracebackExceptionÚ
walk_stackÚwalk_tbc C s4 |dkrt j}t | ¡ ¡ D ]}t||dd� qdS )zyPrint the list of tuples as returned by extract_tb() or
extract_stack() as a formatted stack trace to the given file.NÚ ©ÚfileÚend)ÚsysÚstderrr Ú from_listÚformatÚprint)Úextracted_listr Úitem© r ú!/usr/lib64/python3.8/traceback.pyÚ
print_list s r" c C s t | ¡ ¡ S )a× Format a list of tuples or FrameSummary objects for printing.
Given a list of tuples or FrameSummary objects as returned by
extract_tb() or extract_stack(), return a list of strings ready
for printing.
Each string in the resulting list corresponds to the item with the
same index in the argument list. Each string ends in a newline;
the strings may contain internal newlines as well, for those items
whose source text line is not None.
)r r r )r r r r! r s c C s t t| |d�|d� dS )a 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.
©Úlimit©r N)r" r )Útbr$ r r r r! r - s c C s t | |d� ¡ S )z5A shorthand for 'format_list(extract_tb(tb, limit))'.r# )r r ©r&