def get_executable_path(executable_name):
    exts = os.environ['PATHEXT'].split(os.pathsep)

    # Search in top directory
    filename = os.path.abspath(os.path.join(
            os.path.dirname(__file__),
            '../../..',
            executable_name))
    for ext in exts:
        if os.path.isfile(filename + ext):
            return filename

    # Search in path
    pathlist = os.environ['PATH'].split(os.pathsep) + ["."]
    for path in pathlist:
        for ext in exts:
            fullpath = os.path.join(path, executable_name) + ext
            if os.path.isfile(fullpath):
                return os.path.abspath(fullpath)
get_executable_path(executable_name: str) -> str
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/system/windows.py/get_executable_path