from __future__ import annotations

import os

from . import headless

if os.name == "nt":
    # Windows does not support POSIX PTY (termios/fcntl). Use headless runner or WSL for PTY.
    from . import pty_stub as pty  # type: ignore
else:
    try:
        from . import pty
    except ImportError:
        # Some Python builds lack POSIX PTY dependencies (termios/fcntl). Fall back to stub.
        from . import pty_stub as pty  # type: ignore

__all__ = ["headless", "pty"]
