config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/trace.pyc

hRc@shdZddkZddkZddkZddkZddkZddkZddkZddkZddk	Z	yddk
Z
e
ZWnej
oddkZnXdZ
dZeidZdddYZdZd	Zd
ddYZdZd
ZdZdZdddYZdZddZedjoendS(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")
iNcCs|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(twritetsystargv(toutfile((s!/usr/local/lib/python2.5/trace.pytusageCs's#pragma NO COVERs^\s*(#.*)?$tIgnorecBs eZdddZdZRS(cCsQ|pg|_|pg|_ttii|i|_hdd<|_dS(Nis<string>(t_modst_dirstmaptostpathtnormpatht_ignore(tselftmodulestdirs((s!/usr/local/lib/python2.5/trace.pyt__init__sscCs|ii|o|i|Snxv|iD]k}||jod|i|<dSnt|}||| jo&||djod|i|<dSq,q,W|djod|i|<dSnx=|iD]2}|i|tiod|i|<dSqqWd|i|<dS(Nit.i(	Rthas_keyRtlentNoneRt
startswithR	tsep(R
tfilenamet
modulenametmodtntd((s!/usr/local/lib/python2.5/trace.pytnameszs*


"





N(t__name__t
__module__RRR(((s!/usr/local/lib/python2.5/trace.pyRrscCs.tii|}tii|\}}|S(s-Return a plausible module name for the patch.(R	R
tbasenametsplitext(R
tbaseRtext((s!/usr/local/lib/python2.5/trace.pytmodnamescCstii|}d}xttiD]i}tii|}|i|oA|t|tijo't|t|jo
|}qq"q"W|o|t|d}n|}|itid}tio|itid}ntii	|\}}|S(s,Return a plausible module name for the path.tiR(
R	R
tnormcaseRRRRtreplacetaltsepR (R
tcomparepathtlongesttdirR!RR"((s!/usr/local/lib/python2.5/trace.pytfullmodnames 
*
tCoverageResultscBsDeZddddddZdZeeddZdZRS(cCsK||_|idjo
h|_n|ii|_||_|idjo
h|_n|ii|_||_|idjo
h|_n|ii|_||_||_|ioyDti	t
|id\}}}|i|i|||WqGt
ttfj
o#}tid|i|fIJqGXndS(NtrbsSkipping counts file %r: %s(tcountsRtcopytcountertcalledfuncstcallerstinfileRtpickletloadtopentupdatet	__class__tIOErrortEOFErrort
ValueErrorRtstderr(R
R.R1R3R2Rterr((s!/usr/local/lib/python2.5/trace.pyRs*	
	
	
		
$ 
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(R.R1R2tkeystget(	R
totherR.R1R2tother_countstother_calledfuncst
other_callerstkey((s!/usr/local/lib/python2.5/trace.pyR7s						
"

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}xs|iD]e\}}|djoqn|id	oqn|ido|d }n|djo.t
iit
ii
|}t|}n7|}t
ii|pt
i|nt|}|ot|}nh}ti|}t
ii||d
}|i||||\}}|o5|o.td||}||||f||<qqW|oZ|oS|i}|idGHx5|D])}||\}}}}d||GHq)Wn|ioby5ti|i|i|ift|iddWqtj
o}tid|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(R1R>tsortR2R.R?t	iteritemsRtendswithRR	R
tdirnametabspathR#texiststmakedirsR+tfind_executable_linenost	linecachetgetlinestjointwrite_results_filetintRR4tdumpR6R9RR<(R
tshow_missingtsummarytcoverdirtcallsRRtfuncnametlastfilet	lastcfiletpfiletpmodtpfunctcfiletcmodtcfunctper_filetlinenot	lines_hittsumstcountR*tlnotabtsourcet	coverpathtn_hitstn_linestpercenttmodstmR=((s!/usr/local/lib/python2.5/trace.pyt
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||	i	dq_W|i
||fS(
s'Return a coverage results file in path.tws2trace: Could not open %r for writing: %s- skippingiis%5d: s       s>>>>>> i(ii(R6R9RR<t	enumerateRtrx_blanktmatchtPRAGMA_NOCOVERt
expandtabstclose(R
R
tlinesRfRcRR=RjRititlineRb((s!/usr/local/lib/python2.5/trace.pyRQPs0

	






N(	RRRRR7tTruetFalseRnRQ(((s!/usr/local/lib/python2.5/trace.pyR,s
		[c
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(t	co_lnotabtordRRztco_firstlineno(
tcodetstrstlinenost_[1]tctline_incrementsttable_lengtht	docstringRbtli((s!/usr/local/lib/python2.5/trace.pytfind_lines_from_codets7	

cCsTt||}x>|iD]3}t|tio|it||qqW|S(s<Return lineno dict for all code objects reachable from code.(Rt	co_constst
isinstancettypestCodeTypeR7t
find_lines(R~RRR((s!/usr/local/lib/python2.5/trace.pyRs
cCsh}ti}t|}xti|iD]\}}}}}|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.
    i(	ttokentINDENTR6ttokenizetgenerate_tokenstreadlinetSTRINGtrangeRu(RRt
prev_ttypetftttypettstrtstarttendRxtslinetscoltelinetecolRw((s!/usr/local/lib/python2.5/trace.pyt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: %stexec(R6treadR9RR<tcompileRR(RtprogR=R~R((s!/usr/local/lib/python2.5/trace.pyRMs

	tTracec	BseZdddddddddZdZdddZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZRS(iic		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(R3RRtignoreR.tblabbedtpathtobasenamet	donothingttracet_calledfuncst_callerst
_caller_cachetglobaltrace_trackcallerstglobaltracetglobaltrace_countfuncstglobaltrace_lttlocaltrace_trace_and_countt
localtracetlocaltrace_tracetlocaltrace_count(	R
ReRt
countfuncstcountcallerst
ignoremodst
ignoredirsR3R((s!/usr/local/lib/python2.5/trace.pyRs2										cBsddk}|i}|ip$ei|iei|inz|||UWd|ipeideidnXdS(Ni(t__main__t__dict__RRtsettraceRt	threadingR(R
tcmdRtdict((s!/usr/local/lib/python2.5/trace.pytruns	


cBs|djo
h}n|djo
h}n|ip$ei|iei|inz|||UWd|ipeideidnXdS(N(RRRRRR(R
Rtglobalstlocals((s!/usr/local/lib/python2.5/trace.pytrunctxs






cOsZd}|ipti|inz|||}Wd|iptidnX|S(N(RRRRR(R
tfunctargstkwtresult((s!/usr/local/lib/python2.5/trace.pytrunfuncs

c
Cs|i}|i}|ot|}nd}|i}d}||ijo)|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|i
dd}di|}d||f}n|||fS(Ntfunc_dociit	__bases__Rs%s.%s(tf_codetco_filenameR#Rtco_nameRtgct
get_referrersthasattrRRRtstrtsplitRP(R
tframeR~RRRXtclsnameRRtfuncst_[2]Rtdictst_[3]Rtclasses((s!/usr/local/lib/python2.5/trace.pytfile_module_function_ofs6			
$$$
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(Rtf_backR(R
Rtwhytargt	this_functparent_func((s!/usr/local/lib/python2.5/trace.pyR4s
cCs1|djo |i|}d|i|<ndS(soHandler for call events.

        Adds (filename, modulename, funcname) to the self._calledfuncs dict.
        RiN(RR(R
RRRR((s!/usr/local/lib/python2.5/trace.pyR?s
cCs|djo|i}|iidd}|oht|}|dj	oK|ii||}|p+|iod||ifGHn|i	SqqqdSndS(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_globalsR?RR#RRRRR(R
RRRR~RRt	ignore_it((s!/usr/local/lib/python2.5/trace.pyRHs
	

cCs|djot|ii}|i}||f}|ii|dd|i|<tii|}d||ti	||fGn|i
S(NRxiis
%s(%d): %s(RRtf_linenoR.R?R	R
RRNtgetlineR(R
RRRRRbRDtbname((s!/usr/local/lib/python2.5/trace.pyR_s
	 	cCs\|djoH|ii}|i}tii|}d||ti||fGn|iS(NRxs
%s(%d): %s(	RRRR	R
RRNRR(R
RRRRRbR((s!/usr/local/lib/python2.5/trace.pyRls
		cCsY|djoE|ii}|i}||f}|ii|dd|i|<n|iS(NRxii(RRRR.R?R(R
RRRRRbRD((s!/usr/local/lib/python2.5/trace.pyRws
	$c
Cs1t|id|id|id|id|iS(NR3RR1R2(R,R.R3RRR(R
((s!/usr/local/lib/python2.5/trace.pytresultss		((N(RRRRRRRRRRRRRRR(((s!/usr/local/lib/python2.5/trace.pyRs-	

		-					
		cCs2tiidtid|ftiddS(Ns%s: %s
ii(RR<RRtexit(tmsg((s!/usr/local/lib/python2.5/trace.pyt	_err_exits!cCsddk}|djo
ti}nyM|i|dddddddd	d
ddd
ddddg\}}Wna|ij
oR}tiidtid|ftiidtidtidnXd}d}d}d}d}	d}
g}g}d}
d}t}t}x|D]\}}|djot	ti
tidn|djo!ti
idtidn|djp
|djo
t}q&n|djp
|djo
t}q&n|djp
|djo
d}q&n|djp
|djo
d}q&n|d jp
|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|i
tiD]}tii|}|id.tiitid/d0tid1 }|id2tiitid/d0tid1 }tii|}|i|qRWq&ndp
td3q&W|o|p|otd4n|p|p|p|p|ptd5n|o|otd6n|o|	otd7n|o!t|djotd8n|o2td9|	d:|	}|i|
d
|d;|
n|t_|d}tii
|dtid<t||d<|d=|d>|d?|d9|	d:|	}y|id@|fWnBtj
o$}tdAtid|fnt j
onX|i!}|p|i|
d
|d;|
ndS(BNiistcrRf:d:msC:lTthelptversionRRetreports	no-reportRUsfile=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 runR3RRVRRRRsexecfile(%r)sCannot run file %r because: %s("tgetoptRRRterrorR<RRRzRtstdoutRytappendRR	tpathsepR
t
expandvarsR&RPtprefixRtexec_prefixRtAssertionErrorRRR,RnRRR9t
SystemExitR(RRtoptst	prog_argvRRReRt	no_reporttcounts_fileRtignore_modulestignore_dirsRVRURRtopttvaltsRtprognamettR=((s!/usr/local/lib/python2.5/trace.pytmains

	!





		#	
	R((((t__doc__RNR	treRRRRRRtcPickleR4tImportErrorRRsRRqRR#R+R,RRRRMRRRRR(((s!/usr/local/lib/python2.5/trace.pys<module>1s<
	*5							


Man Man