Philip Guo wrote: > Does anyone know how to get this information either from a code object or > from a related object? I am hacking the interpreter, so I have full access > to everything.
Does this help? >>> class A(object): ... def method(self): ... pass ... >>> A.method.im_class <class '__main__.A'> >>> A.method.im_class.__module__ '__main__' >>> A.method.im_class.__name__ 'A' >>> A.method.im_func <function method at 0x7f7655bc7a28> >>> A.method.im_func.__name__ 'method' >>> '.'.join((A.method.im_class.__module__, A.method.im_class.__name__, >>> A.method.im_func.__name__)) '__main__.A.method' -- http://mail.python.org/mailman/listinfo/python-list