Lines Matching refs:Telnet
1 :mod:`telnetlib` --- Telnet client
5 :synopsis: Telnet client class.
11 .. index:: single: protocol; Telnet
15 The :mod:`telnetlib` module provides a :class:`Telnet` class that implements the
16 Telnet protocol. See :rfc:`854` for details about the protocol. In addition, it
29 .. class:: Telnet(host=None, port=0[, timeout])
31 :class:`Telnet` represents a connection to a Telnet server. The instance is
32 initially not connected by default; the :meth:`~Telnet.open` method must be used to
46 A :class:`Telnet` object is a context manager and can be used in a
50 >>> from telnetlib import Telnet
51 >>> with Telnet('localhost', 23) as tn:
60 :rfc:`854` - Telnet Protocol Specification
61 Definition of the Telnet protocol.
66 Telnet Objects
69 :class:`Telnet` instances have the following methods:
72 .. method:: Telnet.read_until(expected, timeout=None)
82 .. method:: Telnet.read_all()
87 .. method:: Telnet.read_some()
93 .. method:: Telnet.read_very_eager()
102 .. method:: Telnet.read_eager()
111 .. method:: Telnet.read_lazy()
120 .. method:: Telnet.read_very_lazy()
128 .. method:: Telnet.read_sb_data()
135 .. method:: Telnet.open(host, port=0[, timeout])
138 defaults to the standard Telnet port (23). The optional *timeout* parameter
144 .. audit-event:: telnetlib.Telnet.open self,host,port telnetlib.Telnet.open
147 .. method:: Telnet.msg(msg, *args)
154 .. method:: Telnet.set_debuglevel(debuglevel)
160 .. method:: Telnet.close()
165 .. method:: Telnet.get_socket()
170 .. method:: Telnet.fileno()
175 .. method:: Telnet.write(buffer)
181 .. audit-event:: telnetlib.Telnet.write self,buffer telnetlib.Telnet.write
188 .. method:: Telnet.interact()
190 Interaction function, emulates a very dumb Telnet client.
193 .. method:: Telnet.mt_interact()
198 .. method:: Telnet.expect(list, timeout=None)
220 .. method:: Telnet.set_option_negotiation_callback(callback)
229 Telnet Example
244 tn = telnetlib.Telnet(HOST)