def _handleDescriptionFromFileOption(filename, outDir, usageStr, hsVersion, claDescriptionTemplateFile):
 try:
  fileHandle = open(filename, 'r')
  JSONStringFromFile = fileHandle.read().splitlines()
  JSONStringFromFile = ''.join(JSONStringFromFile)
 except Exception as e:
  raise _InvalidCommandArgException(_makeUsageErrorStr((('File open failed for --descriptionFromFile: %s\n' + 'ARG=<%s>') % (str(e), filename)), usageStr))
 _handleDescriptionOption(JSONStringFromFile, outDir, usageStr, hsVersion=hsVersion, claDescriptionTemplateFile=claDescriptionTemplateFile)
 return

def _handleDescriptionFromFileOption ( filename , outDir , usageStr , hsVersion , claDescriptionTemplateFile ) : try : fileHandle = open ( filename , 'r' ) JSONStringFromFile = fileHandle . read ( ) . splitlines ( ) JSONStringFromFile = '' . join ( JSONStringFromFile ) except Exception as e : raise _InvalidCommandArgException ( _makeUsageErrorStr ( ( ( 'File open failed for --descriptionFromFile: %s\n' + 'ARG=<%s>' ) % ( str ( e ) , filename ) ) , usageStr ) ) _handleDescriptionOption ( JSONStringFromFile , outDir , usageStr , hsVersion = hsVersion , claDescriptionTemplateFile = claDescriptionTemplateFile ) return
parses and validates the --descriptionfromfile option and executes the request parameters: filename: file from which well extract description json outdir: where to place generated experiment files usagestr: program usage string hsversion: which version of hypersearch permutations file to generate .