def _loadDescriptionFile(descriptionPyPath):
 global g_descriptionImportCount
 if (not os.path.isfile(descriptionPyPath)):
  raise RuntimeError((('Experiment description file %s does not exist or ' + 'is not a file') % (descriptionPyPath,)))
 mod = imp.load_source(('pf_description%d' % g_descriptionImportCount), descriptionPyPath)
 g_descriptionImportCount += 1
 if (not hasattr(mod, 'descriptionInterface')):
  raise RuntimeError(('Experiment description file %s does not define %s' % (descriptionPyPath, 'descriptionInterface')))
 if (not isinstance(mod.descriptionInterface, expdescriptionapi.DescriptionIface)):
  raise RuntimeError((('Experiment description file %s defines %s but it ' + 'is not DescriptionIface-based') % (descriptionPyPath, name)))
 return mod

def _loadDescriptionFile ( descriptionPyPath ) : global g_descriptionImportCount if ( not os . path . isfile ( descriptionPyPath ) ) : raise RuntimeError ( ( ( 'Experiment description file %s does not exist or ' + 'is not a file' ) % ( descriptionPyPath , ) ) ) mod = imp . load_source ( ( 'pf_description%d' % g_descriptionImportCount ) , descriptionPyPath ) g_descriptionImportCount += 1 if ( not hasattr ( mod , 'descriptionInterface' ) ) : raise RuntimeError ( ( 'Experiment description file %s does not define %s' % ( descriptionPyPath , 'descriptionInterface' ) ) ) if ( not isinstance ( mod . descriptionInterface , expdescriptionapi . DescriptionIface ) ) : raise RuntimeError ( ( ( 'Experiment description file %s defines %s but it ' + 'is not DescriptionIface-based' ) % ( descriptionPyPath , name ) ) ) return mod
loads a description file and returns it as a module .