def get_known_cmake_generators():
    """ Get the list of known cmake generators.
    Assume cmake is in PATH, or path to cmake is correctly
    configured in ~/.config/qi/qibuild.xml

    """
    build_env = qibuild.config.get_build_env()
    cmake_    = qisys.command.find_program("cmake", env=build_env)
    if not cmake_:
        message = """\
Could not find cmake executable
Please install it if necessary and re-run `qibuild config --wizard`\
"""
        raise qisys.error.Error(message)
    process = subprocess.Popen([cmake_, "--help"], stdout=subprocess.PIPE)
    (out, _err) = process.communicate()
    intersting  = False
    intersting_lines = list()
    magic_line = "The following generators are available on this platform:"
    # pylint: disable-msg=E1103
    for line in out.splitlines():
        # handle lines like that:
        # Generator = "blalblalba"
        #       files.
        if len(line) >= 3:
            if line[2] == ' ' and not line in "=":
                continue
        if line == magic_line:
            intersting = True
            continue
        if intersting:
            intersting_lines.append(line)
    to_parse = ""
    for line in intersting_lines:
        to_parse += line.strip()
        # handle lines like that:
        #   Generator
        #           = "blabla"
        if "=" in line:
            to_parse += "\n"
    res = list()
    for line in to_parse.splitlines():
        generator = line.split("=")[0]
        res.append(generator.strip())
    # Fix Visual Studio generators:
    fixed_list = list()
    for generator in res:
        if "Visual Studio" in generator and "[arch]" in generator:
            fixed_list.append(generator.replace(" [arch]", ""))
            fixed_list.append(generator.replace("[arch]", "Win64"))
            fixed_list.append(generator.replace("[arch]", "ARM"))
        else:
            fixed_list.append(generator)
    return fixed_list
dataset/ETHPy150Open aldebaran/qibuild/python/qibuild/cmake/__init__.py/get_known_cmake_generators/swapped operands of `in`