def parse_lut_file(file_name):

    input = open(file_name, "r")

    line = input.readline()
    n_color = check_lut_first_line(line, file_name)

    lut = []
    for line in input.readlines():
        entr = line.split()
        if len(entr) != 4:
            errmsg="Error: insufficient or too much data in line "\
                    "-- \"%s\""%(entr)
            raise IOError(errmsg)

        tmp = []
        for color in entr:
            try:
                tmp.append(float(color))
            except:
                raise IOError(
                    "Unknown entry '%s'in lookup table input."%color
                )
        lut.append(tmp)

    return lut
Parse the file specified by its name `file_name` for a LUT and
dataset/ETHPy150Open enthought/mayavi/mayavi/core/lut_manager.py/parse_lut_file