fcdZddlZddlZddlZddlZddlZddlmZgdZ d2dZ dZ d3dZ d2dZ d2d Zd Zd ZGd d ZeZdZeedddfdZeeddfdZefdZdZefdZd4dZd5dZd4dZd6dZd3dZd3dZdZ GddZ!dZ"dZ#d Z$d!Z%d"Z&Gd#d$e'Z(d%Z)ej*d&gd'd(d)g*Z+d+Z,d,Z-d-Z.Gd.d/Z/Gd0d1Z0dS)7z@Extract, format and print information about Python stack traces.N)suppress) extract_stack extract_tbformat_exceptionformat_exception_only format_list format_stack format_tb print_exc format_excprint_exception print_last print_stackprint_tb clear_frames FrameSummary StackSummaryTracebackException walk_stackwalk_tbc| tj}t|D]}t ||ddS)zyPrint the list of tuples as returned by extract_tb() or extract_stack() as a formatted stack trace to the given file.Nfileend)sysstderrr from_listformatprint)extracted_listritems 0/opt/alt/python311/lib64/python3.11/traceback.py print_listr$s[ |z&&~66==??'' d2&&&&&''cZt|S)aFormat 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. )rrr)r!s r#rrs$  ! !. 1 1 8 8 : ::r%cFtt|||dS)aPrint 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. limitrN)r$r)tbr)rs r#rr/s*z"E***666666r%cHt||S)z5A shorthand for 'format_list(extract_tb(tb, limit))'.r()rrr+r)s r#r r 9s! b & & & - - / //r%cTtt||S)a# Return a StackSummary object representing a list of pre-processed entries from traceback. This is useful for alternate formatting of stack traces. If 'limit' is omitted or None, all entries are extracted. A pre-processed stack trace entry is a FrameSummary object containing attributes filename, lineno, name, and line representing the information that is usually printed for a stack trace. The line is a string with leading and trailing whitespace stripped; if the source is not available it is None. r()r _extract_from_extended_frame_gen_walk_tb_with_full_positionsr-s r#rr=s.  8 8$R(( 9 7 77r%zG The above exception was the direct cause of the following exception: zF During handling of the above exception, another exception occurred: ceZdZdZdS) _SentinelcdS)Nz selfs r#__repr__z_Sentinel.__repr__[s|r%N)__name__ __module__ __qualname__r7r4r%r#r2r2Zs#r%r2c|tu|tukrtd||cxur turJnnG|Ct|tr ||jfSt dt |jddS||fS)Nz-Both or neither of value and tb must be givenzException expected for value, z foundNN) _sentinel ValueError isinstance BaseException __traceback__ TypeErrortyper8)excvaluer+s r#_parse_value_tbrF`s i00HIII i ?#}-- .C---:#Cyy1:::;; ;: "9r%Tct|||\}}tt||||d}|||dS)aPrint exception up to 'limit' stack trace entries from 'tb' to 'file'. This differs from print_tb() in the following ways: (1) if traceback is not None, it prints a header "Traceback (most recent call last):"; (2) it prints the exception type and value after the stack trace; (3) if type is SyntaxError and value has the appropriate format, it prints the line where the syntax error occurred with a caret on the next line indicating the approximate position of the error. Tr)compactrchainN)rFrrCr )rDrEr+r)rrKtes r#r r osS UB//IE2 DKK% N N NBHH$eH$$$$$r%ct|||\}}tt||||d}t||S)azFormat a stack trace and the exception information. The arguments have the same meaning as the corresponding arguments to print_exception(). The return value is a list of strings, each ending in a newline and some containing internal newlines. When these lines are concatenated and printed, exactly the same text is printed as does print_exception(). TrHrK)rFrrClistr)rDrEr+r)rKrLs r#rrsS UB//IE2 DKK% N N NB   && ' ''r%c|tur|}tt||dd}t|S)aFormat the exception part of a traceback. The return value is a list of strings, each ending in a newline. The list contains the exception's message, which is normally a single string; however, for :exc:`SyntaxError` exceptions, it contains several lines that (when printed) display detailed information about where the syntax error occurred. Following the message, the list contains the exception's ``__notes__``. NT)rI)r=rrCrOr)rDrErLs r#rrsJ  DKKd C C CB ((** + ++r%cJt|d}||sd|z}n|d|d}|S)N exceptionz%s z:  ) _safe_string)etyperEvaluestrlines r#_format_final_exc_linerXs<E;//H }H}~"UUHHH- Kr%cD ||S#d|d|jdcYSxYw)N< z () failed>)r8)rEwhatfuncs r#rTrTs?4tE{{43433$-333333s cDttj|||ddS)z>Shorthand for 'print_exception(*sys.exc_info(), limit, file)'.r)rrKN)r rexc_infor_s r#r r s%S\^^5t5IIIIIIr%cddttj||dS)z%Like print_exc() but return a string.rr)rK)joinrrr`rbs r#r r s* 77#S\^^5NNN O OOr%cttdstdttjtjtj|||dS)znThis is a shorthand for 'print_exception(sys.last_type, sys.last_value, sys.last_traceback, limit, file)'. last_typezno last exceptionN)hasattrrr>r re last_valuelast_tracebackr_s r#rrsU 3 $ $.,---CM3>33E4(((((r%cz|tjj}tt |||dS)zPrint a stack trace from its invocation point. The optional 'f' argument can be used to specify an alternate stack frame at which to start. The optional 'limit' and 'file' arguments have the same meaning as for print_exception(). Nr(r*)r _getframef_backr$r)fr)rs r#rrs= y MOO "}Qe,,,4888888r%cr|tjj}tt ||S)z5Shorthand for 'format_list(extract_stack(f, limit))'.Nr()rrjrkrr)rlr)s r#r r s0y MOO " }Qe444 5 55r%c|tjj}tt ||}||S)asExtract the raw traceback from the current stack frame. The return value has the same format as for extract_tb(). The optional 'f' and 'limit' arguments have the same meaning as for print_stack(). Each item in the list is a quadruple (filename, line number, function name, text), and the entries are in order from oldest to newest stack frame. Nr()rrjrkrextractrreverse)rlr)stacks r#rrsG y MOO "  Ae < Information about a single frame from a traceback. - :attr:`filename` The filename for the frame. - :attr:`lineno` The line within filename for the frame that was active when the frame was captured. - :attr:`name` The name of the function or method that was executing when the frame was captured. - :attr:`line` The text from the linecache module for the of code that was running when the frame was captured. - :attr:`locals` Either None if locals were not supplied, or a dict mapping the name to the repr() of the variable. )filenamelineno end_linenocolno end_colnoname_linelocalsTN) lookup_linerrWr{r|r}c||_||_||_||_|r|j|rd|Dnd|_||_||_| |_ dS)aConstruct a FrameSummary. :param lookup_line: If True, `linecache` is consulted for the source code line. Otherwise, the line will be looked up when first needed. :param locals: If supplied the frame locals, which will be captured as object representations. :param line: If provided, use this instead of looking up the line in the linecache. c4i|]\}}|t|Sr4)repr).0kvs r# z)FrameSummary.__init__..s$===daq$q''===r%N) ryrzr~rrWitemsrr{r|r}) r6ryrzr~rrrWr{r|r}s r#__init__zFrameSummary.__init__sp!      IIAGQ==fllnn====T $ "r%c t|tr@|j|jko/|j|jko|j|jko|j|jkSt|t r|j|j|j|jf|kStSN) r?rryrzr~rtuplerWNotImplementedr6others r#__eq__zFrameSummary.__eq__s e\ * * 1MU^30K5</0I+0K5</ 1 eU # # OM4; 49EN Nr%cB|j|j|j|jf|Sr)ryrzr~rW)r6poss r# __getitem__zFrameSummary.__getitem__&s t{DItyA#FFr%cPt|j|j|j|jgSr)iterryrzr~rWr5s r#__iter__zFrameSummary.__iter__)s!T]DKDIFGGGr%cPd|j|j|jS)Nz7)ryrzr~)rryrzr~r5s r#r7zFrameSummary.__repr__,s0HOO]4;TYPHH Hr%cdS)Nr4r5s r#__len__zFrameSummary.__len__0sqr%c|j|jSr)rWrr5s r#_original_linezFrameSummary._original_line3s zr%c|j-|jdStj|j|j|_|jSr)rrz linecachegetlinerystripr5s r#rWzFrameSummary.line9sC : {"t"*4=$+FFDJz!!!r%)r8r9r:__doc__ __slots__rrrrr7rpropertyrrWr4r%r#rrs  ,I?Cd44#####.GGGHHHHHHX ""X"""r%rc#K|'tjjjjj}|||jfV|j}|dSdS)zWalk a stack yielding the frame and line number for each frame. This will follow f.f_back from the given frame. If no frame is given, the current stack is used. Usually used with StackSummary.extract. N)rrjrkf_lineno)rls r#rrBsQ  y MOO " ) 0 7 -m H -----r%c#DK||j|jfV|j}|dSdS)zWalk a traceback yielding the frame and line number for each frame. This will follow tb.tb_next (and thus is in the opposite order to walk_stack). Usually used with StackSummary.extract. N)rs tb_linenorvrws r#rrOs8 .k2<'''' Z .....r%c#K|Zt|jj|j}|d|j|jf|ddzfVn |j|fV|j}|XdSdS)Nr)_get_code_positionrsf_codetb_lastirrv)r+ positionss r#r0r0Zs .&r{'92;GG  Q< + /)ABB-?? ? ? ? ?+y( ( ( ( Z .....r%c|dkrdS|}ttj||dzdS)Nr)NNNN) co_positionsnext itertoolsislice)codeinstruction_index positions_gens r#rrhsG1''%%''M   0AQ0FMM N NNr%cteZdZdZedddddZedddddZedZd Zd Z dS) rz?A list of FrameSummary objects, representing a stack of frames.NTFr) lookup_linescapture_localscPfd}|||||S)aWCreate a StackSummary from a traceback or stack object. :param frame_gen: A generator that yields (frame, lineno) tuples whose summaries are to be included in the stack. :param limit: None to include all frames or the number of frames to include. :param lookup_lines: If True, lookup lines for each frame immediately, otherwise lookup is deferred until the frame is rendered. :param capture_locals: If True, the local variables from each frame will be captured as object representations into the FrameSummary. c30KD]\}}||dddffVdSrr4)rlrz frame_gens r#extended_frame_genz0StackSummary.extract..extended_frame_gensA& 4 4 6&$d333333 4 4r%r)r/)klassrr)rrrs ` r#rozStackSummary.extracttsN 4 4 4 4 455   L)6++ +r%c @| ttdd}||dkrd}|3|dkrtj||}nt j|| }|}t }|D]\}\}} } } |j} | j} | j }| | tj | |j |r|j}nd}|t!| ||d|| | | |D]} tj| |r |D] }|j |S)Ntracebacklimitr)maxlenF)rrr{r|r})getattrrrr collectionsdequesetr co_filenameco_nameaddr lazycache f_globalsf_localsappendr checkcacherW)rrr)rrresultfnamesrlrzr{r|r}coryr~rs r#r/z-StackSummary._extract_from_extended_frame_gens| =C!1488E UQYY  zz%,Y>> '-iGGG 9B J J 5A5 E9B~H:D JJx  !+ 6 6 6 : MM,&$E(%UiIII J J J J + +H   * * * *     r%c t}|D]Z}t|tr||-|\}}}}|t||||[|S)z Create a StackSummary object from a supplied list of FrameSummary objects or old-style list of tuples. rW)rr?rr)ra_listrframeryrzr~rWs r#rzStackSummary.from_lists O OE%.. O e$$$$/4,&$ l8VTMMMNNNN r%cVg}|d|j|j|j|jru|j}|d||j}t|}t|j }||z }|j |j t||j }t||j } ||| } d} |j|j krAX$X[\$\$\'5T<&H&H1&LO$24$D$Dq$HMJJv&&&JJso8K&KLMMML-;L'Ja-b-b*0>|WMg0h0h- 7#7:L#LMMM 7#9=RUg=g#hiii 7#7=?;Z]r;r#stttt 3-/*I#JKKKJJt$$$   T%m&:&@&@&B&BCC T T e 3::E:RRSSSSwws||s0E  EEcg}d}d}d}d}|D]}||}||%||jks|||jks | ||jkrP|tkr.|tz}|d|d|dkrdndd|j}|j}|j}d}|dz }|tkr|||tkr.|tz}|d|d|dkrdndd|S) aFormat the stack ready for printing. Returns a list of strings ready for printing. Each string in the resulting list corresponds to a single frame from the stack. Each string ends in a newline; the strings may contain internal newlines as well, for those items with source text lines. For long sequences of the same frame and line, the first few repetitions are shown, followed by a summary line stating the exact number of further repetitions. Nrz [Previous line repeated z more timersrz] )rryrzr~_RECURSIVE_CUTOFFr)r6r last_file last_line last_namecountrformatted_frames r#rzStackSummary.formats   ! + +M"77 FFO&!Y-2H%H%H!Y-2F%F%F!Y-2D%D%D,,,..EMM=U==&+aiissR===*2 )0 ).  QJE((( MM/ * * * * $ $ $ & &E MM5U55#aiissR555    r%) r8r9r:r classmethodror/rrrr4r%r#rrqsII+/d ++++[+*DHe''''['R[$???B-----r%rc|d}t|d|ddS)Nzutf-8replace)errors)encoderdecode)stroffsetas_utf8s r#rr8s=jj!!G www&&wy&AA B BBr%_Anchors)rrrr~r)defaultscddl} |}n#t$rYdSwxYwt|jdkrdSfd}|jd}||jdx\}|x|jdxF\||jj}||j j }||}t|t| z } |jj| z} | dz} | dzt|kr"|| dz s| dz } | tkr]| x} s| dvr=| dz } | dz } | tkr | x} 9| dv=t|| || S|jdx5\||jj} ||jjdz} | tkr\| x} s| dkr:| dz } | tkr"| x} 4| dk:| tkr\| x} s| dkr:| dz } | tkr"| x} 4| dk:| tkr| dz } t| | SndS)Nrrc$t|Sr)r)rsegments r#z:_extract_caret_anchors_from_line_segment..Ss?PPr%r4z)#[])astparse SyntaxErrorrbodyExprBinOpleftend_col_offsetright col_offsetrisspacer SubscriptrEslice) r rtree normalize statementexproperator_start operator_end operator_stroperator_offset left_anchor right_anchorchs ` r#rrHsJJJyy!! tt 49~~tPPPPI ! I  X^^^^^d SY[[[[[[%.Yty/G%H%HN#,9TZ-B#C#CL#*>,+F#GL&),&7&7#l>Q>Q>S>S:T:T&TO"&)":_"LK#.?L'!+c,.?.??? ,_q-@ A I I K K@%) %G 44AU;U2:^:^:`:`4dfjndndn#q( $) &G 44AU;U2:^:^:`:`4dfjndndn$IIk$:$:IIl>>%_)> 4s  ++WFc~|r|Sddltfd|d|DS)zCalculate the extra amount of width space the given source code segment might take if it were to be displayed on a fixed width output device. Supports wide unicode characters and emojis.rNc3XK|]$}|tvrdndV%dS)rrN)east_asian_width_WIDE_CHAR_SPECIFIERS)rchar unicodedatas r# z!_display_width..sT  ) )$ / /3H H Har%)isasciir.sum)rWrr.s @r#rrysf  ||~~  &M  r%c"eZdZdZdZddZdS)_ExceptionPrintContextcHt|_d|_d|_dS)NrF)rseenexception_group_depth need_closer5s r#rz_ExceptionPrintContext.__init__s EE %&"r%cdd|jzzS)Nr[r)r6r5s r#indentz_ExceptionPrintContext.indentsa$4455r%Nc#K|d}|}|jr||dzz }t|trt j||dVdS|D]}t j||dVdS)N|r[cdSNTr4rs r#r z-_ExceptionPrintContext.emit..Tr%cdSr=r4rs r#r z-_ExceptionPrintContext.emit..r>r%)r9r6r?rtextwrap)r6text_gen margin_char indent_strtexts r#emitz_ExceptionPrintContext.emits  K[[]]  % , ++ +J h $ $ K/(J8I8IJJ J J J J J  K KodJ8I8IJJJJJJ K Kr%r)r8r9r:rr9rEr4r%r#r3r3sL   666 K K K K K Kr%r3czeZdZdZdddddddddZed Zd Zd Zd Z d Z dZ ddddZ ddddZ dS)raAn exception ready for rendering. The traceback module captures enough attributes from the original exception to this intermediary form to ensure that no references are held, while still being able to fully print or format it. max_group_width and max_group_depth control the formatting of exception groups. The depth refers to the nesting level of the group, and the width refers to the size of a single exception group's exceptions array. The formatted output is truncated when either limit is exceeded. Use `from_exception` to create TracebackException instances from exception objects, or the constructor to create TracebackException instances from individual components. - :attr:`__cause__` A TracebackException of the original *__cause__*. - :attr:`__context__` A TracebackException of the original *__context__*. - :attr:`exceptions` For exception groups - a list of TracebackException instances for the nested *exceptions*. ``None`` for other exceptions. - :attr:`__suppress_context__` The *__suppress_context__* value from the original exception. - :attr:`stack` A `StackSummary` representing the traceback. - :attr:`exc_type` The class of the original traceback. - :attr:`filename` For syntax errors - the filename where the error occurred. - :attr:`lineno` For syntax errors - the linenumber where the error occurred. - :attr:`end_lineno` For syntax errors - the end linenumber where the error occurred. Can be `None` if not present. - :attr:`text` For syntax errors - the text where the error occurred. - :attr:`offset` For syntax errors - the offset into the text where the error occurred. - :attr:`end_offset` For syntax errors - the end offset into the text where the error occurred. Can be `None` if not present. - :attr:`msg` For syntax errors - the compiler error message. NTF )r)rrrImax_group_widthmax_group_depth_seenc | du} | t} | t|||_| |_t t|||||_||_ t|d|_ t|dd|_ n6#t$r)} dt| dtg|_ Yd} ~ nd} ~ wwxYw|rt!|t"rz|j|_|j} | t)| nd|_|j}|t)|nd|_|j|_|j|_|j|_|j|_|r|||jnd|_| s||fg}|r|\}} | rW| jPt| j| vr:t=t?| j| j| jj ||||| |  }nd}|r|duo | duo| j }nd}| rY| j!R|rPt| j!| vr:t=t?| j!| j!| j!j ||||| |  }nd}| ratE| tFrLg}| j$D]A}t=t?|||j ||||| |  }|%|Bnd}||_||_!||_$|r!|%|j| jf|r!|%|j!| j!f|r-|&tO|j$| j$|dSdSdS)NrrR __notes__z!Ignored error getting __notes__: F)r)rrrIrJrKT)(rridrIrJrr/r0rqexc_typerT_strrrMrr issubclassrryrzrr{rDrrmsg _load_lines__suppress_context__pop __cause__rrCrA __context__r?BaseExceptionGroup exceptionsrextendzip)r6rO exc_value exc_tracebackr)rrrIrIrJrKis_recursive_callelnoend_lnoqueuerLcause need_contextcontextrYrDtexcs r#rzTracebackException.__init__sA"- =EEE "Y--   ..!BB ( 7 7l)C++ ! !K88  Z$Y TBBDNN Z Z ZXLKQU4V4VXXZDNNNNNN Z  % 8[99 %%.DM"C&)o#c(((4DK*G.5.Ac'llltDO!DI#*DK'2DO }DH        .7.CI * * ! !A CI&'E? C A !!+11;u44.Q[))  1#%1'5(7(7# % % %EE!E($)TM%?$%TM%?()(>$>!L$(L #!-3$4)+AM):):%)G)G0Q]++  3#%1'5(7(7# % % %GG#G&A'9::&!#J | 0 01 II-"')5+9,;,;"' ) ) )#))$//// 0"&J$ !( * >LL", !<===BLL".!-!@AAACLLR]AL!A!ABBB? C? C? CA CA C? C? CsB)) C3CCcB|t|||jg|Ri|S)z.Create a TracebackException from an exception.)rCrA)clsrDargskwargss r#from_exceptionz!TracebackException.from_exception;s1s499c3#4FtFFFvFFFr%c(|jD] }|j dS)z7Private API. force all lines in the stack to be loaded.N)rqrW)r6rs r#rSzTracebackException._load_lines@s&Z  E JJJ  r%cZt|tr|j|jkStSr)r?r__dict__rrs r#rzTracebackException.__eq__Es* e/ 0 0 3=EN2 2r%c|jSr)rPr5s r#__str__zTracebackException.__str__Js yr%c#rK|jtd|jVdS|jj}|jj}|dvrt |t sd}|dz|z}t|jtst||jVn| |Ed{Vt |j tj j rA|j D]7}t|d}d|dDEd{V8dS|j t|j dt VdSdS) aFormat the exception part of the traceback. The return value is a generator of strings, each ending in a newline. Generator yields the exception message. For :exc:`SyntaxError` exceptions, it also yields (before the exception message) several lines that (when printed) display detailed information about where the syntax error occurred. Following the message, generator also yields all the exception's ``__notes__``. N)__main__builtinsz .notecg|]}|dzS)rSr4)rls r# z.ls???AH???r%rSrM)r])rOrXrPr:r9r?rrQr_format_syntax_errorrMrabcSequencerTsplitr)r6stypesmodrus r#rz(TracebackException.format_exception_onlyMsy = (ty99 9 9 9 F *}' / / /dC(( #"3J&E$-55 8( :: : : : :0077 7 7 7 7 7 7 7 dnko&> ? ? G @ @#D&11??djj.>.>??????????? @ @^ 't~{FFF F F F F F( 'r%c#Kd}|j%d|jpd|jVn!|jd|j}|j}||d}|d}t |t |z }d|V|j|j}|jd vr|jn|}||ks|d kr|d z}|d z |z } |d z |z } | d krHd |d| D} dd | d| | z zdzV|j pd} d|| |VdS)z0Format SyntaxError exceptions (internal helper).rNz File "{}", line {} zz ({})rSz r>Nrrrc3FK|]}|r|ndVdS)r[N)r)rcs r#r/z:TracebackException._format_syntax_error..s3!U!U! #<11!U!U!U!U!U!Ur%z {}{}rzz {}: {}{} ) rzrryrDrrrrrrcrR) r6r}filename_suffixrDrtextltextspacesrrr|r} caretspacerRs r#ryz'TracebackException._format_syntax_errorps ; "*11 +T[:: : : : : ] &%nnT];;Oy  KK%%ELL))EZZ#e**,F##E** * * *{&04y0P0PT__V\ Z'':+;+;!'!J V+&NV3 A::!U!UuVeV}!U!U!UJ$++BGGJ,?,?#UZIZB[^bBbdddddh11!!%o>>>>>>>r%rK_ctxc #K|t}g}|}|rU|rR|jt}|j}n!|j|jst }|j}nd}d}|||f|}|Rn|d|ft|D]\}}|||Ed{V|j |j rM|dEd{V||j Ed{V|| Ed{V|j |jkr%|d|jdEd{V|j dk}|r|xj dz c_ |j rS|d|rdnd Ed{V||j Ed{V|| Ed{Vt|j } | |jkr| } n |jdz} d |_t%| D]} | | dz k} | rd |_|j | |jk} nd } | s| dznd }|| dkrd ndzd|dzV|xj dz c_ | s)|j |  ||Ed{Vn6| |jz }|dkrdnd}|d|d|dEd{V| r'|jr |dzVd |_|xj dzc_ |r|j dksJd|_ dS)aFormat the exception. If chain is not *True*, *__cause__* and *__context__* will not be formatted. The return value is a generator of strings, each ending in a newline and some containing internal newlines. `print_exception` is a wrapper around this method which just prints the lines to a file. The message indicating which exception occurred is always the last string in the output. Nz#Traceback (most recent call last): z... (max_group_depth is z) rrz3Exception Group Traceback (most recent call last): +)rBFTz...z+-z z+---------------- z ---------------- rrrzand z more exceptionrSz&+------------------------------------ )r3rV_cause_messagerWrT_context_messagerreversedrErYrqrrr6rJrrIr7ranger9)r6rKroutputrD chained_msg chained_excrR is_toplevelnum_excsnilast_exc truncatedtitle remainingplurals r#rzTracebackException.formats  <)++D  ' "=,"0K"%-KKo223"2K"%/KK"&K"&K {C0111! " MM4+ & & & ((> 3> 3HC99S>>)))))))~%9=#yy)OPPPPPPPPP#yy)9)9););<<<<<<<<<99S%>%>%@%@AAAAAAAAAA+d.BBB99Ht/CHHHJJJJJJJJJJ $9Q> 4..!3..9=#yyN-8&Bccd ) D DDDDDDDD $yy)9)9););<<<<<<<<<99S%>%>%@%@AAAAAAAAAs~..t333 AA,q0A"'q44A !QqSH/*.+7%&$*>%> $) ,5@qsHH5E;;==$%qDDDDd4JJJJKLLL..!3..$I#&>!#4#;#;%d#;#S#SSSSSSSSS$,t/C$C (1A 2#'99G9GGVGGG$I$IIIIIIII 0DO0#{{}}H IJJJ*/..!3...35::::12D.}> 3> 3r%rJcx| tj}||D]}t||ddS)z7Print the result of self.format(chain=chain) to 'file'.NrNrr)rrrr )r6rrKrWs r#r zTracebackException.printsM <:DKKeK,, + +D $Tr * * * * * + +r%)r8r9r:rrrrkrSrrprryrr r4r%r#rrs $$LEIeU$pCpCpCpCpCdGG[G  !G!G!GF"?"?"?H#b3b3b3b3b3J!+++++++r%rrr<)NNTr=)NNN)1rcollections.abcrrrrr@ contextlibr__all__r$rrr rrrr2r=rFr rrrXrrTr r rrr rrrrrr0rrrOrr namedtuplerrr,rr3rr4r%r#rsFF  $ $ $'''' ; ; ;$777700007777*& &  IKK    #, T%%%%"$-$ ( ( ( ()2,,,,&$'4444JJJJPPPP(((( 9 9 9 96666     K"K"K"K"K"K"K"K"\      OOODDDDD4DDDNCCC "; ! 3Z   ---^$KKKKKKKK.\+\+\+\+\+\+\+\+\+\+r%