client_shell_win32
Windows telnet client shell implementation using blessed/jinxed.
- class Terminal(telnet_writer)[source]
Context manager for terminal mode handling on Windows via blessed/jinxed.
Blessed is a guaranteed dependency on Windows (pyproject.toml environment marker). Mirrors the interface of the POSIX
Terminalclass intelnetlib3.client_shell.Class Initializer.
- ModeDef
alias of
_WinMode
- get_mode()[source]
Return current terminal mode if attached to a tty, otherwise None.
- Return type:
Optional[_WinMode]
- set_mode(mode)[source]
Switch terminal to raw or cooked mode using blessed context managers.
- Return type:
- determine_mode(mode)[source]
Return the appropriate mode for the current telnet negotiation state.
Windows equivalent of the POSIX
Terminal.determine_mode, usingModeDef(raw/echo flags instead of termios bitfields).- Return type:
_WinMode
- check_auto_mode(switched_to_raw, last_will_echo)[source]
Check if auto-mode switching is needed.
Windows equivalent of the POSIX
Terminal.check_auto_mode.- Parameters:
- Return type:
- Returns:
(switched_to_raw, last_will_echo, local_echo)tuple if mode changed, orNoneif no change needed.