b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/traceback.pyo
Size11.4 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:26
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sBdZddkZddkZddkZddddddd d
d d d
dddgZddd�Zdd�Zd�Zddd�Z dd�Z
dd�Z ddd�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_onlyt format_listt format_stackt format_tbt print_exct
format_exctprint_exceptiont
print_lastt print_stacktprint_tbt tb_linenots
cCs|i||�dS(N(twrite(tfiletstrt
terminator((s!/usr/lib64/python2.6/traceback.pyt_print scCsw|djo
ti}nxV|D]N\}}}}t|d|||f�|ot|d|i��q!q!WdS(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.6/traceback.pyt
print_lists

cCsfg}xY|D]Q\}}}}d|||f}|o|d|i�}n|i|�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.6/traceback.pyRs
c
Cs"|djo
ti}n|djo!ttd�o
ti}qHnd}xÍ|dj o¿|djp
||jo¥|i}|i}|i}|i}|i }t
|d|||f�t i |�t i
|||i�} | ot
|d| i��n|i}|d}qQWdS(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_codet co_filenametco_nameRt linecachet
checkcachetgetlinet f_globalsRttb_next(
ttbtlimitRtntfRtcoRRR((s!/usr/lib64/python2.6/traceback.pyR .s*


'     
 cCstt||��S(s6A shorthand for 'format_list(extract_stack(f, limit)).(RR(R,R-((s!/usr/lib64/python2.6/traceback.pyRJsc
Cs|djo!ttd�o
ti}q.ng}d}xÇ|dj o¹|djp
||jo�|i}|i}|i}|i}|i}t i
|�t i |||i �} | o| i
�} nd} |i|||| f�|i}|d}q=W|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.6/traceback.pyRNs*
'     
 cCs�|djo
ti}n|o!t|d�t|||�nt||�}x"|d D]}t||d�q\Wt||dd�dS(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):iÿÿÿÿt RN(RRRRR R(tetypetvalueR,R-RtlinesR((s!/usr/lib64/python2.6/traceback.pyR ns


 cCsD|o 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(R2R3R,R-R((s!/usr/lib64/python2.6/traceback.pyR�s  c
Csyt|t�p3t|ti�p |djpt|�tjot||�gS|i}t |t
�pt||�gSg}y|i \}\}}}}Wnt j
on¨X|pd}|i
d||f�|dj ou|i
d|i��|dj oG|id�| i�} d�| D�} |i
ddi| ��n|}n|i
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
css-x&|]}|i�o|pdVqWdS(R1N(tisspace(t.0tc((s!/usr/lib64/python2.6/traceback.pys <genexpr>Ãs s %s^
RN(t
isinstancet
BaseExceptionttypest InstanceTypeRttypeRt_format_final_exc_linet__name__t
issubclasst SyntaxErrortargst ExceptionRRtrstriptlstriptjoin(
R2R3tstypeR4tmsgRRtoffsettbadlinet
caretspace((s!/usr/lib64/python2.6/traceback.pyR�s.  



cCsCt|�}|djp| od|}nd||f}|S(sGReturn a list of a single line -- normal case for format_exception_onlys%s
s%s: %s
N(t _some_strR(R2R3tvaluestrR((s!/usr/lib64/python2.6/traceback.pyR=Ës
 c Cskyt|�SWntj
onXy t|�}|idd�SWntj
onXdt|�iS(Ntasciitbackslashreplaces<unprintable %s object>(RRBtunicodetencodeR<R>(R3((s!/usr/lib64/python2.6/traceback.pyRKÔs c Cs_|djo
ti}nz/ti�\}}}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-RR2R3R,((s!/usr/lib64/python2.6/traceback.pyRás 

c CsKz5ti�\}}}dit||||��SWdd}}}XdS(s%Like print_exc() but return a string.RN(RRQRERR(R-R2R3R,((s!/usr/lib64/python2.6/traceback.pyRîs cCs=|djo
ti}nttititi||�dS(snThis is a shorthand for 'print_exception(sys.last_type,
sys.last_value, sys.last_traceback, limit, file)'.N(RRRR t last_typet
last_valuetlast_traceback(R-R((s!/usr/lib64/python2.6/traceback.pyR
÷s

cCsa|djo:y
t�WqGtj
oti�dii}qGXntt||�|�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(RtZeroDivisionErrorRRQR#tf_backRR(R/R-R((s!/usr/lib64/python2.6/traceback.pyR s 

cCsZ|djo:y
t�WqGtj
oti�dii}qGXntt||��S(s5Shorthand for 'format_list(extract_stack(f, limit))'.iN(RRURRQR#RVRR(R/R-((s!/usr/lib64/python2.6/traceback.pyRs 

c CsP|djo:y
t�WqGtj
oti�dii}qGXn|djo!ttd�o
ti}qung}d}x¾|dj o°|djp
||jo�|i}|i }|i
}|i }t i
|�t i|||i�}|o|i�}nd}|i||||f�|i}|d}q�W|i�|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(RRURRQR#RVR"R!tf_linenoR$R%R&R'R(R)R*RRtreverse( R/R-RR.RR0RRR((s!/usr/lib64/python2.6/traceback.pyRs4


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

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

  "