API Reference for Enthought Tool Suite 3.2.0
Modifications to the standard profile.py API.
The standard profile.run() method in the Python library does not provide access to variables available to the code snippet during a run. For example, the following fails:
a = 1 profile.run("main(a)")
This is because the variable 'a' will not properly be found. This function fixes the problem.
Runs 'statement' under profiler, optionally saving results in 'filename'.
This function takes a single argument that can be passed to the "exec" statement, and an optional file name. In all cases this routine attempts to "exec" its first argument and gather profiling statistics from the execution. If no file name is present, then this function automatically prints a simple profiling report, sorted by the standard name string (file/line/function-name) that is presented in each line.
| Local name | Refers to |
|---|---|
| profile | profile |
© Copyright 2002-2009 Enthought, Inc.