def find_binary(locations):
    searchpath_sep = ';' if sys.platform == 'win32' else ':'
    searchpaths = os.environ['PATH'].split(searchpath_sep)

    for location in locations:
        if location in '{PATH}':
            for searchpath in searchpaths:
                s = location.replace('{PATH}', searchpath)
                if os.path.isfile(s) and os.access(s, os.X_OK):
                    yield s
        elif os.path.isfile(location) and os.access(location, os.X_OK):
            yield location
dataset/ETHPy150Open gyim/stupidgit/stupidgit_gui/util.py/find_binary/swapped operands of `in`