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