def _get_shortcut_data(target, current=True, has_pywin32=False):
    "get windows menu access data if pywin32 exists, otherwise empty list"
    if not has_pywin32:
        return []
 
    wpdir = str(Path(target).parent)
    data = []
    for name in os.listdir(wpdir):
        bname, ext = Path(name).stem, Path(name).suffix
        if ext.lower() == ".exe":
            # Path for the shortcut file in the start menu folder
            shortcut_name = str(Path(create_winpython_start_menu_folder(current=current)) / bname) + '.lnk'
            data.append(
                (
                    str(Path(wpdir) / name), # Target executable path
                    bname, # Description/Name
                    shortcut_name, # Shortcut file path
                )
            )
    return data
get windows menu access data if pywin32 exists, otherwise empty list
winpython/associate.py