%PDF- %PDF-
Direktori : /usr/local/lib/python3.8/__pycache__/ |
Current File : //usr/local/lib/python3.8/__pycache__/telnetlib.cpython-38.pyc |
U n©ßaÖ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„ ZXeYdMkrFeXƒ 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é éÿ éþ éý éü éû éð éñ éò éó éô éõ éö é÷ éø éù éú é é é é é é é é é é é é é é é é é é é é é é é é é é é é é é é é! é"