On Jul 17, 1:44 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > I want to have a (dynamically) list of all classes defined in a py-file. > Is there a way of getting this list, without manually parsing the file ? > > thanks, > Stef Mientki
I have written something that does something like this, but I am not sure it is the pythonic way. Bascially I am loading the module and then using dir() on the module object I am looking for attribute of the type classobj (for old style classes) and type type (for new style classes). I also heard of the inspect module, but I haven't checked it yet. bests, ./alex -- .w( the_mindstorm )p. -- http://mail.python.org/mailman/listinfo/python-list