Best way to enumerate classes in a module

Дамјан Георгиевски gdamjan at
Wed Jun 24 01:02:33 EDT 2009

I need to programmaticaly enumerate all the classes in a given module. 
Currently I'm using dir(module) but the Notice on the documentation page 
[1]  says "dir() is supplied primarily as a convenience for use at an 
interactive prompt" so that kind of scares me.

Is there a better approach?

If there is, how do I get all the classes of the current module?


дамјан ( )

Q: What's tiny and yellow and very, very, dangerous?
A: A canary with the super-user password.

More information about the Python-list mailing list