telnetlib.Telnet.write()

Telnet.write(buffer) Write a byte string to the socket, doubling any IAC characters. This can block if the connection is blocked. May raise OSError if the connection is closed. Changed in version 3.3: This method used to raise socket.error, which is now an alias of OSError.

telnetlib.Telnet.set_option_negotiation_callback()

Telnet.set_option_negotiation_callback(callback) Each time a telnet option is read on the input flow, this callback (if set) is called with the following parameters: callback(telnet socket, command (DO/DONT/WILL/WONT), option). No other action is done afterwards by telnetlib.

tempfile.gettempdir()

tempfile.gettempdir() Return the name of the directory used for temporary files. This defines the default value for the dir argument to all functions in this module. Python searches a standard list of directories to find one which the calling user can create files in. The list is: The directory named by the TMPDIR environment variable. The directory named by the TEMP environment variable. The directory named by the TMP environment variable. A platform-specific location:On Windows, the direct

telnetlib.Telnet.read_very_lazy()

Telnet.read_very_lazy() Return any data available in the cooked queue (very lazy). Raise EOFError if connection closed and no data available. Return b'' if no cooked data available otherwise. This method never blocks.

telnetlib.Telnet.read_very_eager()

Telnet.read_very_eager() Read everything that can be without blocking in I/O (eager). Raise EOFError if connection closed and no cooked data available. Return b'' if no cooked data available otherwise. Do not block unless in the midst of an IAC sequence.

telnetlib.Telnet.read_eager()

Telnet.read_eager() Read readily available data. Raise EOFError if connection closed and no cooked data available. Return b'' if no cooked data available otherwise. Do not block unless in the midst of an IAC sequence.

telnetlib.Telnet.read_all()

Telnet.read_all() Read all data until EOF as bytes; block until connection closed.

telnetlib.Telnet.read_until()

Telnet.read_until(expected, timeout=None) Read until a given byte string, expected, is encountered or until timeout seconds have passed. When no match is found, return whatever is available instead, possibly empty bytes. Raise EOFError if the connection is closed and no cooked data is available.

telnetlib.Telnet.read_some()

Telnet.read_some() Read at least one byte of cooked data unless EOF is hit. Return b'' if EOF is hit. Block if no data is immediately available.

telnetlib.Telnet.read_sb_data()

Telnet.read_sb_data() Return the data collected between a SB/SE pair (suboption begin/end). The callback should access these data when it was invoked with a SE command. This method never blocks.