Critics have remarked that those four worthies were truly peerless throughout the ages; yet the present falls short of the pastβ€”the ancients favored unadorned simplicity, whereas the moderns prefer refined elegance. Styles of substance and ornament rise and fall in succession, shifting with the changing mores of the times; such evolution is simply the natural order of things. The ideal lies in honoring antiquity without clashing with the present, and embracing modernity without succumbing to its flawsβ€”embodying that perfect balance of substance and refinement that defines the true gentleman. There is surely no need to abandon a carved palace in favor of a cave dwelling, or to trade a jade carriage for a primitive cart with solid wooden wheels.🌌 SpectraShell

🌌 SpectraShell

Current path: lib64/python2.7/



⬆️ Go up: /lib64

πŸ“„ Viewing: traceback.pyo

οΏ½
zfc@sBdZddlZddlZddlZddddddd	d
ddd
dddgZdddοΏ½ZddοΏ½ZdοΏ½ZdddοΏ½Z	ddοΏ½Z
ddοΏ½ZdddοΏ½ZddοΏ½Z
dοΏ½ZdοΏ½ZdοΏ½ZdddοΏ½ZddοΏ½Zddd οΏ½Zdddd!οΏ½Zddd"οΏ½Zddd#οΏ½Zd$οΏ½ZdS(%s@Extract, format and print information about Python stack traces.iοΏ½οΏ½οΏ½οΏ½Nt
extract_stackt
extract_tbtformat_exceptiontformat_exception_onlytformat_listtformat_stackt	format_tbt	print_exct
format_exctprint_exceptiont
print_lasttprint_stacktprint_tbt	tb_linenots
cCs|j||οΏ½dS(N(twrite(tfiletstrt
terminator((s!/usr/lib64/python2.7/traceback.pyt_printscCss|dkrtj}nxT|D]L\}}}}t|d|||fοΏ½|rt|d|jοΏ½οΏ½qqWdS(syPrint the list of tuples as returned by extract_tb() or
    extract_stack() as a formatted stack trace to the given file.s  File "%s", line %d, in %ss    %sN(tNonetsyststderrRtstrip(textracted_listRtfilenametlinenotnametline((s!/usr/lib64/python2.7/traceback.pyt
print_listscCsdg}xW|D]O\}}}}d|||f}|rO|d|jοΏ½}n|j|οΏ½q
W|S(sοΏ½Format a list of traceback entry tuples for printing.

    Given a list of tuples 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.
    s  File "%s", line %d, in %s
s    %s
(Rtappend(RtlistRRRRtitem((s!/usr/lib64/python2.7/traceback.pyRs
c
Cs|dkrtj}n|dkrBttdοΏ½rBtj}qBnd}xοΏ½|dk	r|dkso||kr|j}|j}|j}|j}|j	}t
|d|||fοΏ½tj|οΏ½tj
|||jοΏ½}	|	rοΏ½t
|d|	jοΏ½οΏ½n|j}|d}qKWdS(sPrint 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.
    ttracebacklimitis  File "%s", line %d, in %ss    iN(RRRthasattrR!ttb_frameR
tf_codetco_filenametco_nameRt	linecachet
checkcachetgetlinet	f_globalsRttb_next(
ttbtlimitRtntfRtcoRRR((s!/usr/lib64/python2.7/traceback.pyR.s('					
	cCstt||οΏ½οΏ½S(s5A shorthand for 'format_list(extract_tb(tb, limit))'.(RR(R,R-((s!/usr/lib64/python2.7/traceback.pyRJsc
CsοΏ½|dkr*ttdοΏ½r*tj}q*ng}d}xοΏ½|dk	rοΏ½|dks]||krοΏ½|j}|j}|j}|j}|j}t	j
|οΏ½t	j|||jοΏ½}	|	rοΏ½|	j
οΏ½}	nd}	|j||||	fοΏ½|j}|d}q9W|S(sοΏ½Return list of up to limit 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 quadruple (filename, line
    number, function name, text) representing the information that is
    usually printed for a stack trace.  The text is a string with
    leading and trailing whitespace stripped; if the source is not
    available it is None.
    R!iiN(RR"RR!R#R
R$R%R&R'R(R)R*RRR+(
R,R-RR.R/RR0RRR((s!/usr/lib64/python2.7/traceback.pyRNs('					
	cCsr|dkrtj}n|r>t|dοΏ½t|||οΏ½nt||οΏ½}x|D]}t||dοΏ½qTWdS(sοΏ½Print 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.
    s"Traceback (most recent call last):RN(RRRRRR(tetypetvalueR,R-RtlinesR((s!/usr/lib64/python2.7/traceback.pyR	ns

cCsB|r%dg}|t||οΏ½}ng}|t||οΏ½}|S(szFormat 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().
    s#Traceback (most recent call last):
(RR(R1R2R,R-R((s!/usr/lib64/python2.7/traceback.pyRοΏ½s		c
CsοΏ½t|tοΏ½s?t|tjοΏ½s?|d	ks?t|οΏ½tkrOt||οΏ½gS|j}t	|t
οΏ½swt||οΏ½gSg}y|j\}\}}}}Wntk
rοΏ½nοΏ½X|pοΏ½d}|j
d||fοΏ½|d	k	rj|j
d|jοΏ½οΏ½|d	k	rj|jdοΏ½}	tt|	οΏ½|οΏ½d}|	| jοΏ½}	dοΏ½|	DοΏ½}	|j
ddj|	οΏ½οΏ½qjn|}|j
t||οΏ½οΏ½|S(
sFormat the exception part of a traceback.

    The arguments are the exception type and value such as given by
    sys.last_type and sys.last_value. The return value is a list of
    strings, each ending in a newline.

    Normally, the list contains a single string; however, for
    SyntaxError exceptions, it contains several lines that (when
    printed) display detailed information about where the syntax
    error occurred.

    The message indicating which exception occurred is always the last
    string in the list.

    s<string>s  File "%s", line %d
s    %s
s
icss'|]}|jοΏ½r|pdVqdS(t N(tisspace(t.0tc((s!/usr/lib64/python2.7/traceback.pys	<genexpr>οΏ½ss    %s^
RN(t
isinstancet
BaseExceptionttypestInstanceTypeRttypeRt_format_final_exc_linet__name__t
issubclasstSyntaxErrortargst	ExceptionRRtrstriptmintlentlstriptjoin(
R1R2tstypeR3tmsgRRtoffsettbadlinet
caretspace((s!/usr/lib64/python2.7/traceback.pyRοΏ½s2	
 cCs@t|οΏ½}|dks|r,d|}nd||f}|S(sGReturn a list of a single line -- normal case for format_exception_onlys%s
s%s: %s
N(t	_some_strR(R1R2tvaluestrR((s!/usr/lib64/python2.7/traceback.pyR=οΏ½s

cCsgyt|οΏ½SWntk
r!nXy t|οΏ½}|jddοΏ½SWntk
rUnXdt|οΏ½jS(Ntasciitbackslashreplaces<unprintable %s object>(RRBtunicodetencodeR<R>(R2((s!/usr/lib64/python2.7/traceback.pyRMοΏ½s

cCs]|dkrtj}nz/tjοΏ½\}}}t|||||οΏ½Wdd}}}XdS(sοΏ½Shorthand for 'print_exception(sys.exc_type, sys.exc_value, sys.exc_traceback, limit, file)'.
    (In fact, it uses sys.exc_info() to retrieve the same information
    in a thread-safe way.)N(RRRtexc_infoR	(R-RR1R2R,((s!/usr/lib64/python2.7/traceback.pyRοΏ½scCsKz5tjοΏ½\}}}djt||||οΏ½οΏ½SWdd}}}XdS(s%Like print_exc() but return a string.RN(RRSRGRR(R-R1R2R,((s!/usr/lib64/python2.7/traceback.pyRοΏ½s cCsYttdοΏ½stdοΏ½οΏ½n|dkr6tj}nttjtjtj||οΏ½dS(snThis is a shorthand for 'print_exception(sys.last_type,
    sys.last_value, sys.last_traceback, limit, file)'.t	last_typesno last exceptionN(	R"Rt
ValueErrorRRR	RTt
last_valuetlast_traceback(R-R((s!/usr/lib64/python2.7/traceback.pyR
οΏ½scCs]|dkrCy
tοΏ½WqCtk
r?tjοΏ½djj}qCXntt||οΏ½|οΏ½dS(sοΏ½Print 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().
    iN(RtZeroDivisionErrorRRSR#tf_backRR(R/R-R((s!/usr/lib64/python2.7/traceback.pyRs

cCsV|dkrCy
tοΏ½WqCtk
r?tjοΏ½djj}qCXntt||οΏ½οΏ½S(s5Shorthand for 'format_list(extract_stack(f, limit))'.iN(RRXRRSR#RYRR(R/R-((s!/usr/lib64/python2.7/traceback.pyRs

c	CsB|dkrCy
tοΏ½WqCtk
r?tjοΏ½djj}qCXn|dkrmttdοΏ½rmtj}qmng}d}xοΏ½|dk	r3|dksοΏ½||kr3|j}|j	}|j
}|j}tj
|οΏ½tj|||jοΏ½}|rοΏ½|jοΏ½}nd}|j||||fοΏ½|j}|d}q|W|jοΏ½|S(ssExtract 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.
    iR!iiN(RRXRRSR#RYR"R!tf_linenoR$R%R&R'R(R)R*RRtreverse(	R/R-RR.RR0RRR((s!/usr/lib64/python2.7/traceback.pyRs2	

'				
	
cCs|jS(sRCalculate correct line number of traceback given in tb.

    Obsolete in 2.3.
    (R
(R,((s!/usr/lib64/python2.7/traceback.pyR
;s(t__doc__R'RR:t__all__RRRRRRRR	RRR=RMRRR
RRRR
(((s!/usr/lib64/python2.7/traceback.pyt<module>s2			 	8			

		"


πŸ“