//usr/lib64/lib64//lib64/lib64/python2.7/ó
ÙœSec @ sB d Z d d l Z d d l Z d d l Z d d d d d d d d
d d d
d d d g Z d d d „ Z d d „ Z d „ Z d d d „ Z d d „ Z
d d „ Z d d d „ Z d d „ Z
d „ Z d „ Z d „ Z d d d „ Z d d „ Z d d d „ Z d d d d! „ Z d d d" „ Z d d d# „ Z d$ „ Z d S(% s@ Extract, format and print information about Python stack traces.iÿÿÿÿNt
extract_stackt
extract_tbt format_exceptiont format_exception_onlyt format_listt format_stackt format_tbt print_exct
format_exct print_exceptiont
print_lastt print_stackt print_tbt tb_linenot s
c C s | j | | ƒ d S( N( t write( t filet strt
terminator( ( s! /usr/lib64/python2.7/traceback.pyt _print s c C ss | d k r t j } n xT | D]L \ } } } } t | d | | | f ƒ | r t | d | j ƒ ƒ q q Wd S( sy Print 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( t Nonet syst stderrR t strip( t extracted_listR t filenamet linenot namet line( ( s! /usr/lib64/python2.7/traceback.pyt
print_list s c C sd g } 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
( R t append( R t listR R R R t item( ( s! /usr/lib64/python2.7/traceback.pyR s
c
C s | d k r t j } n | d k rB t t d ƒ rB t j } qB n d } xÇ | d k r| d k so | | k r| j } | j } | j } | j } | j } t
| d | | | f ƒ t j | ƒ t j
| | | j ƒ } | rû t
| d | j ƒ ƒ n | j } | d } qK Wd S( s 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.
t tracebacklimiti s File "%s", line %d, in %ss i N( R R R t hasattrR! t tb_frameR
t f_codet co_filenamet co_nameR t linecachet
checkcachet getlinet f_globalsR t tb_next(
t tbt limitR t nt fR t coR R R ( ( s! /usr/lib64/python2.7/traceback.pyR . s( '
c C s t t | | ƒ ƒ S( s6 A shorthand for 'format_list(extract_stack(f, limit)).( R R ( R, R- ( ( s! /usr/lib64/python2.7/traceback.pyR J s c
C sþ | d k r* t t d ƒ r* t j } q* n g } d } xÁ | d k rù | d k s] | | k rù | j } | j } | j } | j } | j } t j
| ƒ t j | | | j ƒ } | rÄ | j
ƒ } n d } | j | | | | f ƒ | j } | d } q9 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! i i N( R R" R R! R# R
R$ R% R&