def METHOD_NAME(filename, key):
    """Parses a hspice output.lis file for a key value"""
    lower_key = key.lower()
    if OPTS.spice_name == "xa" :
        # customsim has a different output file name
        full_filename="{0}xa.meas".format(OPTS.openram_temp)
    elif OPTS.spice_name == "spectre":
        full_filename = os.path.join(OPTS.openram_temp, "delay_stim.measure")
    elif OPTS.spice_name in ["Xyce", "xyce"]:
        full_filename = os.path.join(OPTS.openram_temp, "spice_stdout.log")
    else:
        # ngspice/hspice using a .lis file
        full_filename = "{0}{1}.lis".format(OPTS.openram_temp, filename)
    try:
        f = open(full_filename, "r")
    except IOError:
        debug.error("Unable to open spice output file: {0}".format(full_filename),1)
        debug.archive()
    contents = f.read().lower()
    f.close()
    # val = re.search(r"{0}\s*=\s*(-?\d+.?\d*\S*)\s+.*".format(key), contents)
    val = re.search(r"{0}\s*=\s*(-?\d+.?\d*[e]?[-+]?[0-9]*\S*)\s+.*".format(lower_key), contents)
    if val != None:
        debug.info(4, "Key = " + lower_key + " Val = " + val.group(1))
        return convert_to_float(val.group(1))
    else:
        return "Failed"