from pathlib import Path
import platform


def get_py_prefix(venv_path: Path) -> Path:
    """Return the appropriate prefix for the virtual environment's Python.

    >>> # If platform.system() is 'Windows'
    >>> get_py_prefix(Path.cwd()/'.venv')
    Path('.venv/Scripts/python.exe')

    >>> # If platform.system() is not 'Windows'
    >>> get_py_prefix(Path.cwd()/'.venv')
    Path('.venv/bin/python3')
    """
    if platform.system().lower() == 'windows':
        return venv_path / "Scripts" / "python.exe"

    return venv_path / "bin" / "python3"