INNER CODE UNIT · Python

check_python_version

rfc-st/humble · humble.py:240

def check_python_version():
    """Verify that the host's Python version meets the minimum requirements.

    Prints an error and exit if the version is below the threshold defined in
    `PYTHON_REQUIRED_VERSION`.
    """
    if sys.version_info < PYTHON_REQUIRED_VERSION:
        host_python = f"{sys.version_info.major}.{sys.version_info.minor}"
        host_msg = get_detail("[python_host_version]", replace=True)
        print(f"\n{host_msg} {host_python}.")
        print_detail("[python_required_version]", 3)
        sys.exit(1)


def process_proxy_url(proxy_url, timeout=3.0):
    """Parse and validate proxy URL accessibility, related to `-p` option."""
    parsed_proxy_url = urlparse(proxy_url)
    proxy_host = parsed_proxy_url.hostname

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…