Re: How override ALL function calls? (Is there a function call function?)
On 31 Jul 2005 12:01:36 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm trying run a homegrown profiler on some Python code. Rather than apply profiler wrapper to ALL functions by hand Is there a low level Python function I can override to modify how ALL functions are called? You may want to look at import sys help(sys.settrace) Help on built-in function settrace in module sys: settrace(...) settrace(function) Set the global debug tracing function. It will be called on each function call. See the debugger chapter in the library manual. Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list
How override ALL function calls? (Is there a function call function?)
I'm trying run a homegrown profiler on some Python code. Rather than apply profiler wrapper to ALL functions by hand Is there a low level Python function I can override to modify how ALL functions are called? Chris -- http://mail.python.org/mailman/listinfo/python-list
Re: How override ALL function calls? (Is there a function call function?)
[EMAIL PROTECTED] wrote: I'm trying run a homegrown profiler on some Python code. Rather than apply profiler wrapper to ALL functions by hand Is there a low level Python function I can override to modify how ALL functions are called? Yes, please take a look at sys.setprofile(). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list