This may get you started (warning: not really tested).
$ echo instr.py
from warnings import warn
oget = object.__getattribute__
tget = type.__getattribute__
class Instr(object):
class __metaclass__(type):
def __getattribute__(cls, name):
clsname = tget(cls, '__na
I'm trying to reverse-engineer some pretty complex code. One thing that would
help me a lot is if I could instrument a key class, so that I'd get a report of
when and how each method was called and any properties or attributes were
accessed during a typical run.
I could do this relatively easil