Staging
v0.5.1
https://github.com/python/cpython
Revision c9ea7572e97c959ef01c486d7f97da89c60f5db9 authored by Guido van Rossum on 10 April 1998, 18:08:06 UTC, committed by Guido van Rossum on 10 April 1998, 18:08:06 UTC
beta -- if there are bugs, I'll post a patch page and release 1.5.2
sooner.)
1 parent 4d856ee
Raw File
Tip revision: c9ea7572e97c959ef01c486d7f97da89c60f5db9 authored by Guido van Rossum on 10 April 1998, 18:08:06 UTC
Set the patch level to 1.5.1. (I'm not going to release this as a
Tip revision: c9ea757
libgopherlib.tex
\section{Standard Module \module{gopherlib}}
\label{module-gopherlib}
\stmodindex{gopherlib}
\indexii{Gopher}{protocol}


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

The module defines the following functions:

\begin{funcdesc}{send_selector}{selector, host\optional{, port}}
Send a \var{selector} string to the gopher server at \var{host} and
\var{port} (default \code{70}).  Returns an open file object from
which the returned document can be read.
\end{funcdesc}

\begin{funcdesc}{send_query}{selector, query, host\optional{, port}}
Send a \var{selector} string and a \var{query} string to a gopher
server at \var{host} and \var{port} (default \code{70}).  Returns an
open file object from which the returned document can be read.
\end{funcdesc}

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 \samp{0}), lines are
terminated by CRLF, and the data is terminated by a line consisting of
a single \samp{.}, and a leading \samp{.} should be stripped from
lines that begin with \samp{..}.  Directory listings (first character
of the selector is \samp{1}) are transferred using the same protocol.
back to top