instrumenting Python code

Amir Michail amichail at cse.unsw.edu.au
Wed Mar 27 01:13:23 EST 2002


Hi,

I was wondering if there is an easy way to instrument Python code
so that I can collect information about a particular execution. In
particular, I am interested in collecting the following info:

* functions called in execution

* which function called what other function (the call graph)

* the values of local/global variables

It seems I can get all this from the debugger module though it doesn't
appear to have been designed to be used from another program.  The profiler
module only gives the first item above.

Any recommendations?

Amir



More information about the Python-list mailing list