Creating class instance from module and class name

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Tue Oct 6 10:13:37 CEST 2009

gentlestone a écrit :


> one more question - __class__ is the way for getting the classname
> from the class instance -

obj.__class__ is a reference to the class object itself, not it's name.

> how can I get the module name?


And while we're at it: obj.__class__.__module__ might be of some 
interest too.

More information about the Python-list mailing list