-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathtelnetlib.pyi
120 lines (113 loc) · 2.75 KB
/
telnetlib.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import socket
from _typeshed import Self
from collections.abc import Callable, Sequence
from types import TracebackType
from typing import Any, Match, Pattern
__all__ = ["Telnet"]
DEBUGLEVEL: int
TELNET_PORT: int
IAC: bytes
DONT: bytes
DO: bytes
WONT: bytes
WILL: bytes
theNULL: bytes
SE: bytes
NOP: bytes
DM: bytes
BRK: bytes
IP: bytes
AO: bytes
AYT: bytes
EC: bytes
EL: bytes
GA: bytes
SB: bytes
BINARY: bytes
ECHO: bytes
RCP: bytes
SGA: bytes
NAMS: bytes
STATUS: bytes
TM: bytes
RCTE: bytes
NAOL: bytes
NAOP: bytes
NAOCRD: bytes
NAOHTS: bytes
NAOHTD: bytes
NAOFFD: bytes
NAOVTS: bytes
NAOVTD: bytes
NAOLFD: bytes
XASCII: bytes
LOGOUT: bytes
BM: bytes
DET: bytes
SUPDUP: bytes
SUPDUPOUTPUT: bytes
SNDLOC: bytes
TTYPE: bytes
EOR: bytes
TUID: bytes
OUTMRK: bytes
TTYLOC: bytes
VT3270REGIME: bytes
X3PAD: bytes
NAWS: bytes
TSPEED: bytes
LFLOW: bytes
LINEMODE: bytes
XDISPLOC: bytes
OLD_ENVIRON: bytes
AUTHENTICATION: bytes
ENCRYPT: bytes
NEW_ENVIRON: bytes
TN3270E: bytes
XAUTH: bytes
CHARSET: bytes
RSP: bytes
COM_PORT_OPTION: bytes
SUPPRESS_LOCAL_ECHO: bytes
TLS: bytes
KERMIT: bytes
SEND_URL: bytes
FORWARD_X: bytes
PRAGMA_LOGON: bytes
SSPI_LOGON: bytes
PRAGMA_HEARTBEAT: bytes
EXOPL: bytes
NOOPT: bytes
class Telnet:
host: str | None # undocumented
def __init__(self, host: str | None = ..., port: int = ..., timeout: float = ...) -> None: ...
def open(self, host: str, port: int = ..., timeout: float = ...) -> None: ...
def msg(self, msg: str, *args: Any) -> None: ...
def set_debuglevel(self, debuglevel: int) -> None: ...
def close(self) -> None: ...
def get_socket(self) -> socket.socket: ...
def fileno(self) -> int: ...
def write(self, buffer: bytes) -> None: ...
def read_until(self, match: bytes, timeout: float | None = ...) -> bytes: ...
def read_all(self) -> bytes: ...
def read_some(self) -> bytes: ...
def read_very_eager(self) -> bytes: ...
def read_eager(self) -> bytes: ...
def read_lazy(self) -> bytes: ...
def read_very_lazy(self) -> bytes: ...
def read_sb_data(self) -> bytes: ...
def set_option_negotiation_callback(self, callback: Callable[[socket.socket, bytes, bytes], object] | None) -> None: ...
def process_rawq(self) -> None: ...
def rawq_getchar(self) -> bytes: ...
def fill_rawq(self) -> None: ...
def sock_avail(self) -> bool: ...
def interact(self) -> None: ...
def mt_interact(self) -> None: ...
def listener(self) -> None: ...
def expect(
self, list: Sequence[Pattern[bytes] | bytes], timeout: float | None = ...
) -> tuple[int, Match[bytes] | None, bytes]: ...
def __enter__(self: Self) -> Self: ...
def __exit__(
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None
) -> None: ...