Class list of a module

2007-01-14 Thread Laurent . LAFFONT-ST
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,

Re: Class list of a module

2007-01-15 Thread Laurent . LAFFONT-ST
> 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

Python SECS-II module

2007-02-01 Thread Laurent . LAFFONT-ST
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