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
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,
#!/usr/bin/env python
'''
I want to dynamically add or replace bound methods in a class. I want
the modifications to be immediately effective across all instances,
whether created before or after the class was modified. I need this
to work for both old ('classic') and new style classes, at both
#!/usr/bin/env python
# Sorry... :} cut/paste error fixed...
'''
I want to dynamically add or replace bound methods in a class. I want
the modifications to be immediately effective across all instances,
whether created before or after the class was modified. I need this
to work for both old