Torsten Bronger wrote: > Hallöchen! > > How can I get a list with all classes defined in the current module? > Thank you! > > Tschö, > Torsten. >
Assuming you want to see all classes in the re module: >>> import re >>> help(re) #best way >>> >>> def isclass(cls): ... try: ... return issubclass(cls, cls) ... except TypeError: ... pass ... return False ... >>> [cls for cls in dir(re) if isclass(getattr(re, cls))] ['Scanner', '_pattern_type', 'error'] Ian -- http://mail.python.org/mailman/listinfo/python-list