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(aModule):
return [getattr(aModule, attName) \
for attName in aModule.__dict__ \
if inspect.isclass(getattr(aModule,
> Looks rather simple to me... Anyway, you could avoid calling getattr
> twice, if you iterate over vars(aModule).itervalues()
> def getClassList(aModule):
> return [cls for cls in vars(aModule).itervalues()
> if inspect.isclass(cls)]
> (And note that there is no need for using \ at the l
Hi,
I searching for a python module which implements SEMI E-4 / E-5
SECS-II/HSMS communication protocol. Is anyone have informations about
this ?
Regards,
Laurent Laffont < [EMAIL PROTECTED] >--
http://mail.python.org/mailman/listinfo/python-list