I'm designing a command line tool and I'd like to implement a Plugin feature.
The idea would be that upon startup, the tool scans all packages in its current virtualenv and lists all classes that inherit from a specific base class (say foo.BasePlugin
).
I found easily how to get the list of installed modules but I have no idea how to list the classes for each listed package/distribution.
Is there a way to list all defined classes in all modules of the current virtualenv ?