Hi,
I want to get all classes of a module in a list. I wrote this code but I
wonder
if there's not a simpler solution
import inspect
def getClassList(aM odule):
return [getattr(aModule , attName) \
for attName in aModule.__dict_ _ \
if inspect.isclass (getattr(aModul e, attName))]
Regards,
Laurent Laffont
I want to get all classes of a module in a list. I wrote this code but I
wonder
if there's not a simpler solution
import inspect
def getClassList(aM odule):
return [getattr(aModule , attName) \
for attName in aModule.__dict_ _ \
if inspect.isclass (getattr(aModul e, attName))]
Regards,
Laurent Laffont