def getPhotometerByName(name):
 for photom in getAllPhotometers():
  if ((name.lower() in photom.driverFor) or (name == photom.longName)):
   return photom

def getPhotometerByName ( name ) : for photom in getAllPhotometers ( ) : if ( ( name . lower ( ) in photom . driverFor ) or ( name == photom . longName ) ) : return photom
gets a photometer class by name .