Getting the module name from a method...

Greg Ewing greg.ewing at
Tue Aug 17 18:26:35 EDT 1999

"Stephen J. Turner" wrote:
> How about "self.__class__.__module__"?

No, that will give you the module of the
instance's class. This is not necessarily
the same as the class defining the currently
running method, which could be an inherited


More information about the Python-list mailing list