determining the source code and module based on the class

thebjorn BjornSteinarFjeldPettersen at gmail.com
Mon Jul 16 02:26:03 EDT 2007


On Jul 16, 6:55 am, alf <ask at me> 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




More information about the Python-list mailing list