Re: Hooking any/all 'calls'

2006-12-28 Thread Kevin Little
Thanks, Robert! That was exactly what I was looking for. -k fumanchu [EMAIL PROTECTED] wrote: Kevin Little wrote: In Python 2.4 or 2.5, what is the easiest way to hook any and all callables such that designated code is executed at the very start and end of each call? (Yes, I'm trying to

Hooking any/all 'calls'

2006-12-27 Thread Kevin Little
In Python 2.4 or 2.5, what is the easiest way to hook any and all callables such that designated code is executed at the very start and end of each call? (Yes, I'm trying to come up with a little debugging tool!:) Is there a single metaclass who's __call__ method can be wrapped to do this? TIA,

Re: Hooking any/all 'calls'

2006-12-27 Thread Gabriel Genellina
At Wednesday 27/12/2006 23:07, Kevin Little wrote: In Python 2.4 or 2.5, what is the easiest way to hook any and all callables such that designated code is executed at the very start and end of each call? (Yes, I'm trying to come up with a little debugging tool!:) Is there a single metaclass

Re: Hooking any/all 'calls'

2006-12-27 Thread fumanchu
Kevin Little wrote: In Python 2.4 or 2.5, what is the easiest way to hook any and all callables such that designated code is executed at the very start and end of each call? (Yes, I'm trying to come up with a little debugging tool!:) Is there a single metaclass who's __call__ method can be