ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
Python Documentation
Library Reference
11. Internet Protocols and Support
11.1 webbrowser -- Convenient Web-browser controller
11.2 cgi -- Common Gateway Interface support.
11.3 cgitb -- Traceback manager for CGI scripts
11.4 urllib -- Open arbitrary resources by URL
11.5 urllib2 -- extensible library for opening URLs
11.6 httplib -- HTTP protocol client
11.7 ftplib -- FTP protocol client
11.8 gopherlib -- Gopher protocol client
11.9 poplib -- POP3 protocol client
11.10 imaplib -- IMAP4 protocol client
11.11 nntplib -- NNTP protocol client
11.12 smtplib -- SMTP protocol client
11.13 smtpd -- SMTP Server
11.14 telnetlib -- Telnet client
11.14.1 Telnet Objects
11.14.2 Telnet Example
11.15 urlparse -- Parse URLs into components
11.16 SocketServer -- A framework for network servers
11.17 BaseHTTPServer -- Basic HTTP server
11.18 SimpleHTTPServer -- Simple HTTP request handler
11.19 CGIHTTPServer -- CGI-capable HTTP request handler
11.20 cookielib -- Cookie handling for HTTP clients
11.21 Cookie -- HTTP state management
11.22 xmlrpclib -- XML-RPC client access
11.23 SimpleXMLRPCServer -- Basic XML-RPC server
11.24 DocXMLRPCServer -- Self-documenting XML-RPC server
11.25 asyncore -- Asynchronous socket handler
11.26 asynchat -- Asynchronous socket command/response handler

MyASPN >> Reference >> ActivePython 2.4 >> Python Documentation >> Library Reference >> 11. Internet Protocols and Support
ActivePython 2.4 documentation

11.14 telnetlib -- Telnet client

The telnetlib module provides a Telnet class that implements the Telnet protocol. See RFC 854 for details about the protocol. In addition, it provides symbolic constants for the protocol characters (see below), and for the telnet options. The symbolic names of the telnet options follow the definitions in arpa/telnet.h, with the leading TELOPT_ removed. For symbolic names of options which are traditionally not included in arpa/telnet.h, see the module source itself.

The symbolic constants for the telnet commands are: IAC, DONT, DO, WONT, WILL, SE (Subnegotiation End), NOP (No Operation), DM (Data Mark), BRK (Break), IP (Interrupt process), AO (Abort output), AYT (Are You There), EC (Erase Character), EL (Erase Line), GA (Go Ahead), SB (Subnegotiation Begin).

class Telnet( [host[, port]])
Telnet represents a connection to a Telnet server. The instance is initially not connected by default; the open() method must be used to establish a connection. Alternatively, the host name and optional port number can be passed to the constructor, to, in which case the connection to the server will be established before the constructor returns.

Do not reopen an already connected instance.

This class has many read_*() methods. Note that some of them raise EOFError when the end of the connection is read, because they can return an empty string for other reasons. See the individual descriptions below.

See Also:

RFC 854, Telnet Protocol Specification
Definition of the Telnet protocol.



See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved