def iso9660(path):
 IMPLEMENTATIONS = [('isoinfo', has_isoinfo, Iso9660IsoInfo), ('iso-read', has_isoread, Iso9660IsoRead), ('mount', can_mount, Iso9660Mount)]
 for (name, check, klass) in IMPLEMENTATIONS:
  if check():
   logging.debug('Automatically chosen class for iso9660: %s', name)
   return klass(path)
 return None

def iso9660 ( path ) : IMPLEMENTATIONS = [ ( 'isoinfo' , has_isoinfo , Iso9660IsoInfo ) , ( 'iso-read' , has_isoread , Iso9660IsoRead ) , ( 'mount' , can_mount , Iso9660Mount ) ] for ( name , check , klass ) in IMPLEMENTATIONS : if check ( ) : logging . debug ( 'Automatically chosen class for iso9660: %s' , name ) return klass ( path ) return None
checks the avaiable tools on a system and chooses class accordingly this is a convinience function .