def is_python_distribution(path):
    """Return True if path is a Python distribution."""
    has_exec = Path(get_python_executable(path)).is_file()
    has_site = Path(get_site_packages_path(path)).is_dir()
    return has_exec and has_site
Return True if path is a Python distribution.
winpython/utils.py