Edit file File name : telnetlib.cpython-36.opt-1.pyc Content :3 \`Z � @ sJ d Z ddlZddlZddlZddlmZ dgZdZdZ e dg�Ze dg�Ze dg�Z e d g�Ze d g�Ze dg�Ze dg�Ze dg�Ze d g�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Ze dg�Z e dg�Z!e dg�Z"e dg�Z#e dg�Z$e dg�Z%e dg�Z&e d g�Z'e d!g�Z(e d"g�Z)e d#g�Z*e d$g�Z+e d%g�Z,e d&g�Z-e d'g�Z.e d(g�Z/e d)g�Z0e d*g�Z1e d+g�Z2e dg�Z3e d,g�Z4e d-g�Z5e d.g�Z6e d/g�Z7e d0g�Z8e d1g�Z9e d2g�Z:e d3g�Z;e d4g�Z<e d5g�Z=e d6g�Z>e d7g�Z?e d8g�Z@e d9g�ZAe d:g�ZBe d;g�ZCe d<g�ZDe d=g�ZEe d>g�ZFe d?g�ZGe d@g�ZHe dAg�ZIe dBg�ZJe dCg�ZKe dDg�ZLe dEg�ZMe dFg�ZNe dGg�ZOe dHg�ZPe dg�ZQe dg�ZReSedI��rejTZUnejVZUG dJd� d�ZWdKdL� ZXeYdMk�rFeX� dS )NaQ TELNET client class. Based on RFC 854: TELNET Protocol Specification, by J. Postel and J. Reynolds Example: >>> from telnetlib import Telnet >>> tn = Telnet('www.python.org', 79) # connect to finger port >>> tn.write(b'guido\r\n') >>> print(tn.read_all()) Login Name TTY Idle When Where guido Guido van Rossum pts/2 <Dec 2 11:10> snag.cnri.reston.. >>> Note that read_all() won't read until eof -- it just reads some data -- but it guarantees to read at least one byte unless EOF is hit. It is possible to pass a Telnet object to a selector in order to wait until more data is available. Note that in this case, read_eager() may return b'' even if there was data on the socket, because the protocol negotiation may have eaten the data. This is why EOFError is needed in some cases to distinguish between "no data" and "connection closed" (since the socket also appears ready for reading when it is closed). To do: - option negotiation - timeout should be intrinsic to the connection object instead of an option on one of the read calls only � N)� monotonic�Telnet� � � � � � �� �� �� �� �� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �! �"