trace.Trace

class trace.Trace(count=1, trace=1, countfuncs=0, countcallers=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None, timing=False)
@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

__init__(count=1, trace=1, countfuncs=0, countcallers=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None, timing=False)
@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

Methods

__init__([count, trace, countfuncs, ...]) @param count true iff it should count number of times each
file_module_function_of(frame)
globaltrace_countfuncs(frame, why, arg) Handler for call events.
globaltrace_lt(frame, why, arg) Handler for call events.
globaltrace_trackcallers(frame, why, arg) Handler for call events.
localtrace_count(frame, why, arg)
localtrace_trace(frame, why, arg)
localtrace_trace_and_count(frame, why, arg)
results()
run(cmd)
runctx(cmd[, globals, locals])
runfunc(func, *args, **kw)
globaltrace_countfuncs(frame, why, arg)

Handler for call events.

Adds (filename, modulename, funcname) to the self._calledfuncs dict.

globaltrace_lt(frame, why, arg)

Handler for call events.

If the code block being entered is to be ignored, returns `None’, else returns self.localtrace.

globaltrace_trackcallers(frame, why, arg)

Handler for call events.

Adds information about who called who to the self._callers dict.

Navigation