traceback.format_exc()

traceback.format_exc(limit=None, chain=True) This is like print_exc(limit) but returns a string instead of printing to a file.

trace.Trace.runfunc()

runfunc(func, *args, **kwds) Call func with the given arguments under control of the Trace object with the current tracing parameters.

traceback.format_exception()

traceback.format_exception(etype, value, tb, limit=None, chain=True) Format a stack trace and the exception information. The arguments have the same meaning as the corresponding arguments to print_exception(). The return value is a list of strings, each ending in a newline and some containing internal newlines. When these lines are concatenated and printed, exactly the same text is printed as does print_exception().

traceback.extract_tb()

traceback.extract_tb(tb, limit=None) Return a list of “pre-processed” stack trace entries extracted from the traceback object tb. It is useful for alternate formatting of stack traces. The optional limit argument has the same meaning as for print_tb(). A “pre-processed” stack trace entry is a 4-tuple (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 so

trace.Trace.run()

run(cmd) Execute the command and gather statistics from the execution with the current tracing parameters. cmd must be a string or code object, suitable for passing into exec().

trace.Trace

class trace.Trace(count=1, trace=1, countfuncs=0, countcallers=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None, timing=False) Create an object to trace execution of a single statement or expression. All parameters are optional. count enables counting of line numbers. trace enables line execution tracing. countfuncs enables listing of the functions called during the run. countcallers enables call relationship tracking. ignoremods is a list of modules or packages to ignore. ignoredi

trace.Trace.runctx()

runctx(cmd, globals=None, locals=None) Execute the command and gather statistics from the execution with the current tracing parameters, in the defined global and local environments. If not defined, globals and locals default to empty dictionaries.

trace.CoverageResults

class trace.CoverageResults A container for coverage results, created by Trace.results(). Should not be created directly by the user. update(other) Merge in data from another CoverageResults object. write_results(show_missing=True, summary=False, coverdir=None) Write coverage results. Set show_missing to show lines that had no hits. Set summary to include in the output the coverage summary per module. coverdir specifies the directory into which the coverage result files will be outp

trace.CoverageResults.write_results()

write_results(show_missing=True, summary=False, coverdir=None) Write coverage results. Set show_missing to show lines that had no hits. Set summary to include in the output the coverage summary per module. coverdir specifies the directory into which the coverage result files will be output. If None, the results for each source file are placed in its directory.

trace.CoverageResults.update()

update(other) Merge in data from another CoverageResults object.