Lines Matching +full:write +full:- +full:host
1 :mod:`telnetlib` --- Telnet client
13 --------------
29 .. class:: Telnet(host=None, port=0[, timeout])
33 establish a connection. Alternatively, the host name and optional port
60 :rfc:`854` - Telnet Protocol Specification
64 .. _telnet-objects:
67 --------------
135 .. method:: Telnet.open(host, port=0[, timeout])
137 Connect to a host. The optional second argument is the port number, which
144 .. audit-event:: telnetlib.Telnet.open self,host,port telnetlib.Telnet.open
175 .. method:: Telnet.write(buffer)
177 Write a byte string to the socket, doubling any IAC characters. This can
181 .. audit-event:: telnetlib.Telnet.write self,buffer telnetlib.Telnet.write
203 (:ref:`regex objects <re-objects>`) or uncompiled (byte strings). The
212 Otherwise, when nothing matches, return ``(-1, None, data)`` where *data* is
217 non-deterministic, and may depend on the I/O timing.
227 .. _telnet-example:
230 --------------
232 .. sectionauthor:: Peter Funk <pf@artcom-gmbh.de>
240 HOST = "localhost"
244 tn = telnetlib.Telnet(HOST)
247 tn.write(user.encode('ascii') + b"\n")
250 tn.write(password.encode('ascii') + b"\n")
252 tn.write(b"ls\n")
253 tn.write(b"exit\n")