Finding all classes in a module

Michael Gilfix mgilfix at
Fri Aug 9 09:28:00 CEST 2002

  Perhaps something along the lines of:

    import types
    import mymodule
    for name in mymodule.__dict__.keys ():
       if type (mymodule.__dict__[name]) == types.ClassType:
         print name

                 -- Mike

On Fri, Aug 09 @ 16:15, Tom Harris wrote:
> If I import a module, how do I find the names of the class objects it
> contains?

Michael Gilfix
mgilfix at

For my gpg public key:"

More information about the Python-list mailing list