INNER CODE UNIT · Python

_interactive_terminal

FLOCK4H/Dexter · Dexter.py:249

def _interactive_terminal() -> bool:
    return bool(sys.stdin.isatty() and sys.stdout.isatty())


def _tui_available() -> tuple[bool, str | None]:
    if curses is not None:
        return True, None

    detail = "Dexter's interactive terminal UI is unavailable because Python could not import curses."
    if _CURSES_IMPORT_ERROR is not None:
        detail = f"{detail} ({_CURSES_IMPORT_ERROR})"
    if os.name == "nt":
        detail = (
            f"{detail}\n"
            "Windows support requires the bundled `windows-curses` dependency. "
            "Reinstall Dexter with `python -m pip install .` or install it directly with "
            "`python -m pip install windows-curses`."
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…