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

Reference
ActivePython 2.5
Python Documentation
Library Reference
18. Internet Protocols and Support
18.1 webbrowser -- Convenient Web-browser controller
18.2 cgi -- Common Gateway Interface support.
18.3 cgitb -- Traceback manager for CGI scripts
18.4 wsgiref -- WSGI Utilities and Reference Implementation
18.5 urllib -- Open arbitrary resources by URL
18.6 urllib2 -- extensible library for opening URLs
18.7 httplib -- HTTP protocol client
18.8 ftplib -- FTP protocol client
18.9 gopherlib -- Gopher protocol client
18.10 poplib -- POP3 protocol client
18.11 imaplib -- IMAP4 protocol client
18.12 nntplib -- NNTP protocol client
18.13 smtplib -- SMTP protocol client
18.14 smtpd -- SMTP Server
18.15 telnetlib -- Telnet client
18.16 uuid -- UUID objects according to RFC 4122
18.17 urlparse -- Parse URLs into components
18.18 SocketServer -- A framework for network servers
18.19 BaseHTTPServer -- Basic HTTP server
18.20 SimpleHTTPServer -- Simple HTTP request handler
18.21 CGIHTTPServer -- CGI-capable HTTP request handler
18.22 cookielib -- Cookie handling for HTTP clients
18.23 Cookie -- HTTP state management
18.24 xmlrpclib -- XML-RPC client access
18.25 SimpleXMLRPCServer -- Basic XML-RPC server
18.26 DocXMLRPCServer -- Self-documenting XML-RPC server

MyASPN >> Reference >> ActivePython 2.5 >> Python Documentation >> Library Reference >> 18. Internet Protocols and Support
ActivePython 2.5 documentation

18.9 gopherlib -- Gopher protocol client

Deprecated since release 2.5. The gopher protocol is not in active use anymore.

This module provides a minimal implementation of client side of the Gopher protocol. It is used by the module urllib to handle URLs that use the Gopher protocol.

The module defines the following functions:

send_selector( selector, host[, port])
Send a selector string to the gopher server at host and port (default 70). Returns an open file object from which the returned document can be read.

send_query( selector, query, host[, port])
Send a selector string and a query string to a gopher server at host and port (default 70). Returns an open file object from which the returned document can be read.

Note that the data returned by the Gopher server can be of any type, depending on the first character of the selector string. If the data is text (first character of the selector is "0"), lines are terminated by CRLF, and the data is terminated by a line consisting of a single ".", and a leading "." should be stripped from lines that begin with "..". Directory listings (first character of the selector is "1") are transferred using the same protocol.

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

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