Re: determining the source code and module based on the class

2007-07-15 Thread thebjorn
On Jul 16, 6:55 am, alf <[EMAIL PROTECTED]> wrote: ... > now I need a piece of code which based on the class name can point to > the module as well as the line number where the given class is defined. > > Is it doable in Python? look in the inspect module. -- bjorn -- http://mail.python.org/mai

determining the source code and module based on the class

2007-07-15 Thread alf
Hi, Let's say I have a class defined somewhere: class A: pass now I import (indirectly) a module defining that class (and in fact thousands of others defined in hundreds of modules) where all I have is a list of them provided: l=[A,B,C] now I need a piece of code which based on the cl