KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/trace.pyc
m
=5Dc@sGdZdkZdkZdkZdkZdkZdkZdkZdkZdk	Z	ydk
Z
e
ZWnej
odkZnXdZ
dZeidZdfdYZdZdZd	fd
YZdZdZd
ZdZdfdYZdZddZedjoendS(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
   # create a Trace object, telling it what to ignore, and whether to
   # do tracing or line-counting or both.
   trace = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,], trace=0,
                       count=1)
   # run the new command using the given trace
   trace.run('main()')
   # make a report, telling it where you want output
   r = trace.results()
   r.write_results(show_missing=True)
NcCs|idtiddS(NsNUsage: %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.)

Filters, may be repeated multiple times:
--ignore-module=<mod> Ignore the given module and its submodules
                      (if it is a package).
--ignore-dir=<dir>    Ignore files in the given directory (multiple
                      directories can be joined by os.pathsep).
i(toutfiletwritetsystargv(R((t/usr/lib64/python2.4/trace.pytusageAss#pragma NO COVERs^\s*(#.*)?$tIgnorecBs tZdddZdZRS(NcCsQ|pg|_|pg|_ttii|i|_hdd<|_	dS(Ns<string>i(
tmodulestselft_modstdirst_dirstmaptostpathtnormpatht_ignore(RRR
((Rt__init__qscCs|ii|o|i|Snxv|iD]k}||jod|i|<dSnt|}||| jo&||djod|i|<dSq,q,W|djod|i|<dSnx=|i
D]2}|i|t
iod|i|<dSqqWd|i|<dS(Nit.i(RRthas_keyt
modulenameR	tmodtlentntfilenametNoneRtdt
startswithR
tsep(RRRRRR((Rtnamesxs*


"





(t__name__t
__module__RRR(((RRpscCs.tii|}tii|\}}|S(s-Return a plausible module name for the patch.N(R
RtbasenametbasetsplitextRtext(RR#R!R((RtmodnamescCsd}xetiD]Z}|i|oD|t|tiijo't|t|jo
|}qjqqW|o|t|d}n|}|i	tid}ti
o|i	ti
d}ntii|\}}|S(s,Return a plausible module name for the path.tiRN(tlongestRRtdirRRR
RR!treplacetaltsepR"RR#(RRR#R!R&R'((Rtfullmodnames
-
tCoverageResultscBsDtZddddddZdZeeddZdZRS(NcCsK||_|idjo
h|_n|ii|_||_|idjo
h|_n|ii|_||_|idjo
h|_n|ii|_||_||_|ioyDt	i
t|id\}}}|i|i
|||WqGtttfj
o#}tid|i|fIJqGXndS(NtrbsSkipping counts file %r: %s(tcountsRRtcopytcountertcalledfuncstcallerstinfileRtpickletloadtopentupdatet	__class__tIOErrortEOFErrort
ValueErrorterrRtstderr(RR-R0R2R1RR;((RRs(	
	
	
		
$ c	Cs|i}|i}|i}|i}|i}|i}x2|iD]$}|i
|d||||<qCWx|iD]}d||<qxWx|iD]}d||<qWdS(s.Merge in the data from another CoverageResultsiiN(RR-R0R1tothertother_countstother_calledfuncst
other_callerstkeystkeytget(	RR=R>R?R@R0RBR-R1((RR6s 						
"

cCs|ioOHdGH|ii}|ix-|D]!\}}}d|||fGHq0Wn|ioHdGH|ii}|id}}
x|D]\\}}}
\}}}||joHdG|GdGH|}d}
n||jo |
|jodG|GH|}
nd||
||fGHqWnh}	xN|iiD]=\}}|	i|h}|	|<|i||f||<q<Wh}xl|	iD]^\}}|djoqn|id	p|id
o|d }n|djo.tiitii|}t!|}n7|}tii"|pti#|nt$|}|ot&|}nh}t(i)|}tii+||d}|i-||||\}}|o5|o.t1d
||}||||f||<qqW|oZ|oS|i}|idGHx5|D])}||\}}}}d||GHq"Wn|i5oby5t6i7|i|i|ift8|i5ddWqt9j
o}t;i<d|IJqXndS(s!
        @param coverdir
        sfunctions called:s*filename: %s, modulename: %s, funcname: %sscalling relationships:R%s***s  -->s    %s.%s -> %s.%ss<string>s.pycs.pyois.coveridslines   cov%   module   (path)s%5d   %3d%%   %s   (%s)twbis"Can't save counts files because %sN(=RR0RAtcallstsortRRtfuncnameR1tlastfilet	lastcfiletpfiletpmodtpfunctcfiletcmodtcfunctper_fileR-tlinenoRCt	lines_hittsumst	iteritemstcounttendswithtcoverdirRR
RtdirnametabspathR'R$texiststmakedirsR*tshow_missingtfind_executable_linenostlnotabt	linecachetgetlinestsourcetjoint	coverpathtwrite_results_filetn_hitstn_linestsummarytinttpercenttmodstmRR3tdumpR5R8R;RR<(RR\RgRWRR;RNRRRORPRLRKRiRIRRaRQRcRMRJRfRSRURjReRERkRGR'R^RH((Rt
write_resultss







	


 


cCsHyt|d}	Wn0tj
o$}tid||fIJd
SnXd}d}xt	|D]\}}|d}
|
|jo-|	id||
|d7}|d7}nhti|o|	idnG|
|jo,t||jo|	id|d7}n|	id|	i||idq_W|	i||fS(s'Return a coverage results file in path.tws2trace: Could not open %r for writing: %s- skippingiis%5d: s       s>>>>>> iN(ii(R5RRR8R;RR<RfRet	enumeratetlinestitlineRQRRRtrx_blanktmatchR^tPRAGMA_NOCOVERt
expandtabstclose(RRRpR^RRReR;RqRfRRQRr((RRdJs0	






(	RRRRR6tTruetFalseRmRd(((RR+s	Yc
Csh}g}|idddD]}|t|q!~}t|}	t	}|i}x3|D]+}||7}||jod||<q_q_W|S(s:Return dict where keys are lines in the line number table.iNi(tlinenost_[1]tcodet	co_lnotabtctordtline_incrementsRttable_lengthRyt	docstringtco_firstlinenoRQtlitstrs(
R|RR~RRzRR{RQRR((Rtfind_lines_from_codens7	

cCsTt||}x>|iD]3}t|tio|i	t
||qqW|S(s<Return lineno dict for all code objects reachable from code.N(RR|RRzt	co_constsR~t
isinstancettypestCodeTypeR6t
find_lines(R|RR~Rz((RR~s
cCsh}ti}t|}xti|i	D]\}	}}}}
|	tijoX|tijoD|\}
}|\}}x)t|
|dD]}d||<qWqn|	}q.W|i|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.
    iN(RttokentINDENTt
prev_ttypeR5Rtfttokenizetgenerate_tokenstreadlinetttypettstrtstarttendRrtSTRINGtslinetscoltelinetecoltrangeRqRw(RRRRRRRRRRRrRqRR((Rtfind_stringss 	

cCswyt|di}Wn0tj
o$}tid||fIJhSnXt||d}t
|}t||S(sAReturn dict where keys are line numbers in the line number table.trUs%Not printing coverage data for %r: %stexecN(
R5RtreadtprogR8R;RR<tcompileR|RRR(RR|R;RR((RR]s	tTracec	BstZddddffdddZdZdddZdZdZdZd	Z	d
Z
dZdZd
Z
dZRS(Niic		Cs||_||_t|||_h|_h|_h|_	d|_
||_h|_h|_
h|_|o|i|_n|o|i|_nz|o#|o|i|_|i|_nP|o|i|_|i|_n-|o|i|_|i|_n
d|_
dS(s9
        @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
        iiN(R2RRRt
ignoremodst
ignoredirstignoreR-tblabbedtpathtobasenamet	donothingttracet_calledfuncst_callerst
_caller_cachetcountcallerstglobaltrace_trackcallerstglobaltracet
countfuncstglobaltrace_countfuncsRUtglobaltrace_lttlocaltrace_trace_and_countt
localtracetlocaltrace_tracetlocaltrace_count(	RRURRRRRR2R((RRs4										cBs~dk}|i}|ip$ei|iei|inz|||UWd|ipeideidnXdS(N(t__main__t__dict__tdictRRRtsettraceRt	threadingtcmdR(RRRR((Rtruns		


cBs|djo
h}n|djo
h}n|ip$ei|iei|inz|||UWd|ipeideidnXdS(N(
tglobalsRtlocalsRRRRRRR(RRRR((Rtrunctxs






cOsZd}|ipti|inz|||}Wd|iptidnX|S(N(
RtresultRRRRRtfunctargstkw(RRRRR((Rtrunfuncs

cCs|i}|i}|ot|}nd}|i}d}||ijo)|i|dj	o|i|}qn2d|i|<g}ti|D]!}
t|
do||
qq~}t|djog}ti|dD]!}t|to||qq~}	t|	djozg}ti|	dD]!}t|do||qBqB~}
t|
djo!t|
d}||i|<qqn|dj	o6|idd}di|}d||f}n|||fS(Ntfunc_dociit	__bases__Rs%s.%s(tframetf_codeR|tco_filenameRR$RRtco_nameRGtclsnameRRR{tgct
get_referrersRthasattrtfuncsRRRRtdictsR~tclasseststrtsplitRb(RRRR|RRRR~RRRRGR{R((Rtfile_module_function_ofs0			
>BB
cCsI|djo8|i|}|i|i}d|i||f<ndS(skHandler for call events.

        Adds information about who called who to the self._callers dict.
        tcalliN(twhyRRRt	this_functf_backtparent_funcR(RRRtargRR((RR.s

cCs1|djo |i|}d|i|<ndS(soHandler for call events.

        Adds (filename, modulename, funcname) to the self._calledfuncs dict.
        RiN(RRRRRR(RRRRR((RR9s
cCs|djo|i}|i}|oht|}|dj	oK|i
i||}|p+|i
od||ifGHn|iSqqqdSndS(sHandler for call events.

        If the code block being entered is to be ignored, returns `None',
        else returns self.localtrace.
        Rs! --- modulename: %s, funcname: %sN(RRRR|RRR$RRRRRt	ignore_itRRR(RRRRR|RRR((RRBs
		

cCs|djot|ii}|i}||f}|i	i
|dd|i	|<tii
|}d||ti||fGn|iS(NRriis
%s(%d): %s(RRRRRtf_linenoRQRBRR-RCR
RR tbnameR_tgetlineR(RRRRRRRQRB((RRYs
	 !cCs\|djoH|ii}|i}tii	|}d||ti||fGn|iS(NRrs
%s(%d): %s(RRRRRRRQR
RR RR_RRR(RRRRRRRQ((RRfs
	!cCsY|djoE|ii}|i}||f}|i	i
|dd|i	|<n|iS(NRrii(RRRRRRRQRBRR-RCR(RRRRRRQRB((RRqs
	$c
Cs1t|id|id|id|id|iS(NR2RR0R1(R+RR-R2RRR(R((Rtresultsys		(RRRRRRRRRRRRRRR(((RRs!.	

		-					
		cCs2tiidtid|ftiddS(Ns%s: %s
ii(RR<RRtmsgtexit(R((Rt	_err_exits!cCsdk}|djo
ti}nyM|i|ddddddddd	d
ddd
dddg\}}Wna|ij
oR}tii	dtid|ftii	dtidti
dnXd}
d}d}d}d}d}g}g}d}d}t}t}x|D]\}	}|	djottiti
dn|	djo!tii	dti
dn|	djp
|	djo
t}q#n|	djp
|	djo
t}q#n|	djp
|	djo
d}
q#n|	djp
|	djo
d}q#n|	djp
|	d jo
d}q#n|	d!jp
|	d"jo
d}q#n|	d#jp
|	d$jo
|}q#n|	d%jp
|	d&jo
d}q#n|	d'jp
|	d(jo
|}q#n|	d)jp
|	d*jo
d}q#n|	d+jo|i|q#n|	d,jox|iti D]}ti"i#|}|i$d-ti"i%ti&d.d/ti'd0 }|i$d1ti"i%ti(d.d/ti'd0 }ti"i)|}|i|qOWq#ndp
t*d2q#W|o|p|
ot+d3n|p|
p|p|p|pt+d4n|o|ot+d5n|o|ot+d6n|o!t,|djot+d7n|o2t-d8|d9|}
|
i/|d	|d:|n|t_|d}ti"i|dti"d<t1||
d;|d<|d=|d>|d8|d9|}y|i3d?|fWnBt4j
o$}t+d@tid|fnt6j
onX|i.}
|p|
i/|d	|d:|ndS(ANistcrRf:d:msC:lTthelptversionRRUtreports	no-reportRgsfile=tmissingsignore-module=signore-dir=s	coverdir=t	listfuncst
trackcallss%s: %s
is%Try `%s --help' for more information
s--helps	--versions
trace 2.0
s-Ts--trackcallss-ls--listfuncss-ts--traces-cs--counts-rs--reports-Rs--no-reports-fs--files-ms	--missings-Cs
--coverdirs-ss	--summarys--ignore-modules--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 runR2RRWRRRRsexecfile(%r)sCannot run file %r because: %s(7tgetoptRRRtoptst	prog_argvterrorRR<RRRRURt	no_reporttcounts_fileRtignore_modulestignore_dirsRWRgRyRRtopttvalRtstdoutRxtappendRR
tpathseptsRt
expandvarsR(RbtprefixRtexec_prefixRtAssertionErrorRRR+RRmtprognameRttRR8R;t
SystemExit(RR;RRRRRRRRRRRRRRRRURWRRgRRR((Rtmains	

=!





		#	
R(t__doc__R_R
treRRRRRRtcPickleR3tImportErrorRRuRRsRR$R*R+RRRR]RRRRR(RRR_R*R]RRRRRRR+RRRRRRR$R
RRRuRsR3((Rt?/s<										
	*5							


Anon7 - 2021