def grepValue(fn, variable):
 variable = (variable + '=')
 for ln in open(fn, 'r'):
  if ln.startswith(variable):
   value = ln[len(variable):].strip()
   return value.strip('"\'')
 raise RuntimeError(('Cannot find variable %s' % variable[:(-1)]))

def grepValue ( fn , variable ) : variable = ( variable + '=' ) for ln in open ( fn , 'r' ) : if ln . startswith ( variable ) : value = ln [ len ( variable ) : ] . strip ( ) return value . strip ( '"\'' ) raise RuntimeError ( ( 'Cannot find variable %s' % variable [ : ( - 1 ) ] ) )
return the unquoted value of a variable from a file .