GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.python.org — 11.6 gopherlib -- Gopher protocol client

Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 11.5.1 FTP Objects Up: 11. Internet Protocols and Next: 11.7 poplib

11.6 gopherlib -- Gopher protocol client

This module provides a minimal implementation of client side of the 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.


Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 11.5.1 FTP Objects Up: 11. Internet Protocols and Next: 11.7 poplib

See About this document... for information on suggesting changes.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.