Getting a list of ALL functions in a class

Hans Nowak hnowak at cuci.nl
Fri Mar 10 00:20:01 CET 2000


Eric Hopper wrote:
> 
> I want to get a dictionary of all functions accessible in a class.
> Doing <class>.__dict__ only gets me the functions defined in that class,
> not any of it's base classes.
> 
> Is there a way to do this simply, or do I have to use __base__ to write
> my own scanner?

This might be what you're looking for:

http://tor.dhs.org/~zephyrfalcon/snippets/source/325.py

HTH,



More information about the Python-list mailing list