Uname: Linux premium228.web-hosting.com 4.18.0-553.144.1.lve.el8.x86_64 #1 SMP Thu Jul 16 08:31:06 UTC 2026 x86_64
User: 2036 (delhdchz)
Group: 2038 (delhdchz)
Disabled functions: NONE
Safe mode: On[ PHPinfo ]
//lib64///python2.7      ( Reset | Go to )
File Name: trace.pyc

zfc@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
yddl Z e Z Wne k
rddl Z nXyddlZWn#e k
rejZdZnXdZdZdZdZejdZd    dd
YZd Zd Zd ddYZdZdZdZdZdddYZdZddZ!e"dkre!ndS(sprogram/module to trace Python program or function execution

Sample use, command line:
  trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs
  trace.py -t --ignore-dir '$prefix' spam.py eggs
  trace.py --trackcalls spam.py eggs

Sample use, programmatically
  import sys

  # create a Trace object, telling it what to ignore, and whether to
  # do tracing or line-counting or both.
  tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,], trace=0,
                    count=1)
  # run the new command using the given tracer
  tracer.run('main()')
  # make a report, placing output in /tmp
  r = tracer.results()
  r.write_results(show_missing=True, coverdir="/tmp")
iNcCstjddS(N(tsystsettracetNone(((s/usr/lib64/python2.7/trace.pyt _unsettraceHscCstj|tj|dS(N(t    threadingRR(tfunc((s/usr/lib64/python2.7/trace.pyt    _settraceKs cCstjdtjddS(N(RRRR(((s/usr/lib64/python2.7/trace.pyROs cCs|jdtjddS(Ns    Usage: %s [OPTIONS] <file> [ARGS]

Meta-options:
--help                Display this help then exit.
--version             Output version information then exit.

Otherwise, exactly one of the following three options must be given:
-t, --trace           Print each line to sys.stdout before it is executed.
-c, --count           Count the number of times each line is executed
                      and write the counts to <module>.cover for each
                      module executed, in the module's directory.
                      See also `--coverdir', `--file', `--no-report' below.
-l, --listfuncs       Keep track of which functions are executed at least
                      once and write the results to sys.stdout after the
                      program exits.
-T, --trackcalls      Keep track of caller/called pairs and write the
                      results to sys.stdout after the program exits.
-r, --report          Generate a report from a counts file; do not execute
                      any code.  `--file' must specify the results file to
                      read, which must have been created in a previous run
                      with `--count --file=FILE'.

Modifiers:
-f, --file=<file>     File to accumulate counts over several runs.
-R, --no-report       Do not generate the coverage report files.
                      Useful if you want to accumulate over several runs.
-C, --coverdir=<dir>  Directory where the report files.  The coverage
                      report for <package>.<module> is written to file
                      <dir>/<package>/<module>.cover.
-m, --missing         Annotate executable lines that were not executed
                      with '>>>>>> '.
-s, --summary         Write a brief summary on stdout for each file.
                      (Can only be used with --count or --report.)
-g, --timing          Prefix each line with the time since the program started.
                      Only used while tracing.

Filters, may be repeated multiple times:
--ignore-module=<mod> Ignore the given module(s) and its submodules
                      (if it is a package).  Accepts comma separated
                      list of module names
--ignore-dir=<dir>    Ignore files in the given directory (multiple
                      directories can be joined by os.pathsep).
i(twriteRtargv(toutfile((s/usr/lib64/python2.7/trace.pytusageSs*s#pragma NO COVERs ^\s*(#.*)?$tIgnorecBs eZdddZdZRS(cCsM|p    g|_|pg|_ttjj|j|_idd6|_dS(Nis<string>(t_modst_dirstmaptostpathtnormpatht_ignore(tselftmodulestdirs((s/usr/lib64/python2.7/trace.pyt__init__scCs||jkr|j|Sxk|jD]`}||krGd|j|<dSt|}||| kr$||dkr$d|j|<dSq$W|dkrd|j|<dSx8|jD]-}|j|tjrd|j|<dSqWd|j|<dS(Nit.i(RR tlenRR t
startswithRtsep(Rtfilenamet
modulenametmodtntd((s/usr/lib64/python2.7/trace.pytnamess&          N(t__name__t
__module__RRR (((s/usr/lib64/python2.7/trace.pyR scCs.tjj|}tjj|\}}|S(s-Return a plausible module name for the patch.(RRtbasenametsplitext(RtbaseRtext((s/usr/lib64/python2.7/trace.pytmodnamescCs tjj|}d}xotjD]d}tjj|}|j|r"|t|tjkr"t|t|kr|}qq"q"W|r|t|d}n|}tjj|\}}|jtjd}tj    r|jtj    d}ntjj
|\}}|j dS(s,Return a plausible module name for the path.tiR( RRtnormcaseRRRRt
splitdrivetreplacetaltsepR$tlstrip(Rt comparepathtlongesttdirR%tdriveRR&((s/usr/lib64/python2.7/trace.pyt fullmodnames (    tCoverageResultscBsDeZddddddZdZeeddZdZRS(cCsA||_|jdkr$i|_n|jj|_||_|jdkrZi|_n|jj|_||_|jdkri|_n|jj|_||_||_|jr=yDtj    t
|jd\}}}|j |j |||Wq=t ttfk
r9}tjd|j|fIJq=XndS(NtrbsSkipping counts file %r: %s(tcountsRtcopytcountert calledfuncstcallerstinfileR    tpickletloadtopentupdatet    __class__tIOErrortEOFErrort
ValueErrorRtstderr(RR5R8R:R9R    terr((s/usr/lib64/python2.7/trace.pyRs*                           $ 
c    Cs|j}|j}|j}|j}|j}|j}x2|jD]$}|j|d||||<qCWx|jD]}d||<qxWx|jD]}d||<qWdS(s.Merge in the data from another CoverageResultsiiN(R5R8R9tkeystget(    RtotherR5R8R9t other_countstother_calledfuncst other_callerstkey((s/usr/lib64/python2.7/trace.pyR>s                        "cCs|jrWHdGH|jj}|jx,|D]!\}}}d|||fGHq/Wn|jrHdGH|jj}|jd}}    x|D]\\}
} } \} }}|
|krHdG|
GdGH|
}d}    n| |
kr|    | krdG| GH| }    nd| | ||fGHqWni}xN|jjD]=\}}|j|i}||<|j||f||<q3Wi}x^|jD]P\}}|dkrqn|jd    rqn|jdr|d  }n|dkrt
j j t
j j |}t|}n4|}t
j j|s7t
j|nt|}|rXt|}ni}tj|}t
j j||d }|j||||\}}|r|rd||}||||f||<qqW|r9|r9|j}|jdGHx4|D])}||\}}}}d||GHq    Wn|jry5tj|j|j|jft|jddWqtk
r}tjd|IJqXndS(s!
        @param coverdir
        sfunctions called:s*filename: %s, modulename: %s, funcname: %sscalling relationships:R(s***s  -->s    %s.%s -> %s.%ss<string>s    <doctest s.pycs.pyois.coveridslines   cov%   module   (path)s%5d   %3d%%   %s   (%s)twbis"Can't save counts files because %sN(s.pycs.pyo(R8REtsortR9R5RFt    iteritemsRtendswithRRRtdirnametabspathR'texiststmakedirsR2tfind_executable_linenost    linecachetgetlinestjointwrite_results_fileR    R;tdumpR=R@RRC(Rt show_missingtsummarytcoverdirtcallsRRtfuncnametlastfilet    lastcfiletpfiletpmodtpfunctcfiletcmodtcfunctper_filetlinenot    lines_hittsumstcountR0tlnotabtsourcet    coverpathtn_hitstn_linestpercenttmodstmRD((s/usr/lib64/python2.7/trace.pyt write_results
s    
    

%                      
     c Cs<yt|d}Wn+tk
r@}tjd||fIJd    SXd}d}xt|D]\}    }
|    d} | |kr|jd|| |d7}|d7}nbtj|
r|jdnC| |krt||    kr|jd|d7}n |jd|j||    j    dqZW|j
||fS(
s'Return a coverage results file in path.tws3trace: Could not open %r for writing: %s - skippingiis%5d: s       s>>>>>> i(ii( R=R@RRCt    enumerateRtrx_blanktmatchtPRAGMA_NOCOVERt
expandtabstclose( RRtlinesRlRiR    RDRpRotitlineRh((s/usr/lib64/python2.7/trace.pyRXes.
 
 
    
N(    R!R"RRR>tTruetFalseRtRX(((s/usr/lib64/python2.7/trace.pyR3s
        [cCsCi}x6tj|D]%\}}||krd||<qqW|S(s:Return dict where keys are lines in the line number table.i(tdistfindlinestarts(tcodetstrstlinenost_Rh((s/usr/lib64/python2.7/trace.pytfind_lines_from_codes
 cCsOt||}x9|jD].}tj|r|jt||qqW|S(s<Return lineno dict for all code objects reachable from code.(Rt    co_conststinspecttiscodeR>t
find_lines(RRRtc((s/usr/lib64/python2.7/trace.pyRs
cCsi}tj}t|}xtj|jD]\}}}}}|tjkr|tjkr|\}    }
|\} } x(t|    | dD]} d|| <qWqn|}q.W|j|S(sReturn a dict of possible docstring positions.

    The dict maps line numbers to strings.  There is an entry for
    line that contains only a string or a part of a triple-quoted
    string.
    i(    ttokentINDENTR=ttokenizetgenerate_tokenstreadlinetSTRINGtrangeR{(RRt
prev_ttypetftttypettstrtstarttendR~tslinetscoltelinetecolR}((s/usr/lib64/python2.7/trace.pyt find_stringss     (  

cCsryt|dj}Wn+tk
rF}tjd||fIJiSXt||d}t|}t||S(sAReturn dict where keys are line numbers in the line number table.trUs%Not printing coverage data for %r: %stexec(R=treadR@RRCtcompileRR(RtprogRDRR((s/usr/lib64/python2.7/trace.pyRTs
  tTracec
BseZdddddddded    ZdZdddZdZdZdZ    dZ
d    Z d
Z d Z d Zd ZRS(iic

Cs-||_||_t|||_i|_i|_i|_d|_||_i|_    i|_
i|_ d|_ |    rtj|_ n|r|j|_n|r|j|_nr|r|r|j|_|j|_nK|r|j|_|j|_n*|r |j|_|j|_n    d|_dS(sx
        @param count true iff it should count number of times each
                     line is executed
        @param trace true iff it should print out each line that is
                     being counted
        @param countfuncs true iff it should just output a list of
                     (filename, modulename, funcname,) for functions
                     that were called at least once;  This overrides
                     `count' and `trace'
        @param ignoremods a list of the names of modules to ignore
        @param ignoredirs a list of the names of directories to ignore
                     all of the (recursive) contents of
        @param infile file from which to read stored counts to be
                     added into the results
        @param outfile file in which to write the results
        @param timing true iff timing information be displayed
        iiN(R:R    R tignoreR5tblabbedtpathtobasenamet    donothingttracet _calledfuncst_callerst _caller_cacheRt
start_timettimetglobaltrace_trackcallerst globaltracetglobaltrace_countfuncstglobaltrace_lttlocaltrace_trace_and_countt
localtracetlocaltrace_tracetlocaltrace_count(
RRkRt
countfuncst countcallerst
ignoremodst
ignoredirsR:R    ttiming((s/usr/lib64/python2.7/trace.pyRs8                                                cCs,ddl}|j}|j|||dS(Ni(t__main__t__dict__trunctx(RtcmdRtdict((s/usr/lib64/python2.7/trace.pytruns     cBsl|dkri}n|dkr*i}n|jsCe|jnz|||UWd|jsgenXdS(N(RRRRR(RRtglobalstlocals((s/usr/lib64/python2.7/trace.pyRs                  cOsVd}|js"tj|jnz|||}Wd|jsQtjdnX|S(N(RRRRR(RRtargstkwtresult((s/usr/lib64/python2.7/trace.pytrunfuncs        c Cs|j}|j}|r't|}nd}|j}d}||jkrq|j|dk    rr|j|}qrnd|j|<gtj|D]}tj    |r|^q}t
|dkrrgtj|dD]}    t |    t r|    ^q}
t
|
dkrrgtj|
dD]} t | dr| ^q} t
| dkro| dj}||j|<qoqrn|dk    rd||f}n|||fS(Niit    __bases__s%s.%s(tf_codet co_filenameR'Rtco_nameRtgct get_referrersRt
isfunctionRt
isinstanceRthasattrR!( RtframeRRRR^tclsnameRtfuncsRtdictsRtclasses((s/usr/lib64/python2.7/trace.pytfile_module_function_ofs2               cCsG|dkrC|j|}|j|j}d|j||f<ndS(skHandler for call events.

        Adds information about who called who to the self._callers dict.
        tcalliN(Rtf_backR(RRtwhytargt    this_funct parent_func((s/usr/lib64/python2.7/trace.pyR:s cCs/|dkr+|j|}d|j|<ndS(soHandler for call events.

        Adds (filename, modulename, funcname) to the self._calledfuncs dict.
        RiN(RR(RRRRR((s/usr/lib64/python2.7/trace.pyREs cCs|dkr|j}|jjdd}|rt|}|dk    r|jj||}|s|jrd||jfGHn|j    SqqdSndS(sHandler for call events.

        If the code block being entered is to be ignored, returns `None',
        else returns self.localtrace.
        Rt__file__s! --- modulename: %s, funcname: %sN(
Rt    f_globalsRFRR'RR RRR(RRRRRRRt    ignore_it((s/usr/lib64/python2.7/trace.pyRNs            cCs|dkr|jj}|j}||f}|jj|dd|j|<|jrndtj|jGntjj    |}d||t
j ||fGn|j S(NR~iis%.2fs
%s(%d): %s( RRtf_linenoR5RFRRRRR#RUtgetlineR(RRRRRRhRKtbname((s/usr/lib64/python2.7/trace.pyRes                cCs{|dkrt|jj}|j}|jrBdtj|jGntjj|}d||tj    ||fGn|j
S(NR~s%.2fs
%s(%d): %s( RRRRRRRR#RURR(RRRRRRhR((s/usr/lib64/python2.7/trace.pyRts              cCsW|dkrP|jj}|j}||f}|jj|dd|j|<n|jS(NR~ii(RRRR5RFR(RRRRRRhRK((s/usr/lib64/python2.7/trace.pyRs        #c
Cs1t|jd|jd|jd|jd|jS(NR:R    R8R9(R3R5R:R    RR(R((s/usr/lib64/python2.7/trace.pytresultss        ((N(R!R"RRRRRRRRRRRRRR(((s/usr/lib64/python2.7/trace.pyRs   1              )                              cCs2tjjdtjd|ftjddS(Ns%s: %s
ii(RRCRRtexit(tmsg((s/usr/lib64/python2.7/trace.pyt    _err_exits!cCsLddl}|dkr$tj}nyP|j|dddddddd    d
d d d dddddg\}}Wn_|jk
r}tjjdtjd|ftjjdtjdtjdnXd}d}d}d}d}    d}
g} g} d} d}t}t}t}x
|D]\}}|dkr`t    tj
tjdn|dkrtj
jdtjdn|dks|dkrt }q+n|dks|dkrt }q+n|dks|dkrt }q+n|dks|d krd}q+n|d!ks4|d"kr@d}q+n|d#ksX|d$krdd}q+n|d%ks||d&krd}q+n|d'ks|d(kr|}    q+n|d)ks|d*krd}
q+n|d+ks|d,kr|} q+n|d-ks |d.krd}q+n|d/krWx*|j d0D]}| j |jq4Wq+n|d1krx|j tjD]}tjj|}|jd2tjjtjd3d4tjd5 }|jd6tjjtjd3d4tjd5 }tjj|}| j |qvWq+nds+td7q+W|rP|sC|rPtd8n|pk|pk|pk|pk|s{td9n|r|rtd:n|r|     rtd;n|rt|dkrtd<n|r
td=|    d>|    }|j|
d
|d?| n>|t_|d}tjj |dtjd<t||d@|dA|dB| dC| d=|    d>|    d|}yft|}t |j!|dD}WdQXi|dE6dFdG6ddH6ddI6}|j"|||Wn>t#k
r    }tdJtjd|fnt$k
rnX|j%}|sH|j|
d
|d?| ndS(KNiistcrRf:d:msC:lTgthelptversionRRktreports    no-reportR[sfile=tmissingsignore-module=s ignore-dir=s    coverdir=t    listfuncst
trackcallsRs%s: %s
is%Try `%s --help' for more information
s--helps    --versions
trace 2.0
s-Ts --trackcallss-ls --listfuncss-gs--timings-ts--traces-cs--counts-rs--reports-Rs --no-reports-fs--files-ms    --missings-Cs
--coverdirs-ss    --summarys--ignore-modulet,s --ignore-dirs$prefixtlibtpythonis $exec_prefixsShould never get heres8cannot specify both --listfuncs and (--trace or --count)sLmust specify one of --trace, --count, --report, --listfuncs, or --trackcallss,cannot specify both --report and --no-reports--report requires a --filesmissing name of file to runR:R    R\RRRRRRRR!t __package__t
__cached__sCannot run file %r because: %s(&tgetoptRRRterrorRCRRRR
tstdoutRtsplittappendtstripRtpathsepRt
expandvarsR+RWtprefixRt exec_prefixRtAssertionErrorRRR3RtRR=RRRR@t
SystemExitR(RRtoptst    prog_argvRRRkRt    no_reportt counts_fileRtignore_modulest ignore_dirsR\R[RRRtopttvalRtsRtprognametttfpRtglobsRD((s/usr/lib64/python2.7/trace.pytmains        !                         
  
  R((((#t__doc__RURtreRRRRRRRtcPickleR;t ImportErrorRRRRR
RyRRwR R'R2R3RRRRTRRRR R!(((s/usr/lib64/python2.7/trace.pyt<module>1sL           
                   -5            
                   

All system for education purposes only. For more tools: Telegram @jackleet

Mr.X Private Shell

Logo
-
New File | New Folder
Command
SQL