def get_python_infos(path):
    """Return (version, architecture) for the Python distribution located in *path*."""
    is_64 = python_query("import sys; print(sys.maxsize > 2**32)", path)
    arch = {"True": 64, "False": 32}.get(is_64, None)
    ver = python_query("import sys;print(f'{sys.version_info.major}.{sys.version_info.minor}')", path)
    return ver, arch
Return (version, architecture) for the Python distribution located in *path*.
winpython/utils.py