annotate Doc/libgopherlib.tex @ 6719:faebc1940432 legacy-trunk

Understand -Xlinker option.
author Guido van Rossum <guido@python.org>
date Tue, 02 Dec 1997 20:38:11 +0000
parents 3468ea8645ca
children d0a97014ed42
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
1 \section{Standard Module \sectcode{gopherlib}}
5818
3468ea8645ca AMK's megapatch:
Guido van Rossum <guido@python.org>
parents: 2596
diff changeset
2 \label{module-gopherlib}
2449
8eeecd233d56 added WWW sections
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 \stmodindex{gopherlib}
2453
cdd3a721b40e a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents: 2449
diff changeset
4
cdd3a721b40e a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents: 2449
diff changeset
5 \renewcommand{\indexsubitem}{(in module gopherlib)}
cdd3a721b40e a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents: 2449
diff changeset
6
2596
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
7 This module provides a minimal implementation of client side of the
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
8 the Gopher protocol. It is used by the module \code{urllib} to handle
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
9 URLs that use the Gopher protocol.
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
10
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
11 The module defines the following functions:
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
12
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
13 \begin{funcdesc}{send_selector}{selector\, host\optional{\, port}}
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
14 Send a \var{selector} string to the gopher server at \var{host} and
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
15 \var{port} (default 70). Return an open file object from which the
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
16 returned document can be read.
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
17 \end{funcdesc}
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
18
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
19 \begin{funcdesc}{send_query}{selector\, query\, host\optional{\, port}}
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
20 Send a \var{selector} string and a \var{query} string to a gopher
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
21 server at \var{host} and \var{port} (default 70). Return an open file
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
22 object from which the returned document can be read.
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
23 \end{funcdesc}
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
24
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
25 Note that the data returned by the Gopher server can be of any type,
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
26 depending on the first character of the selector string. If the data
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
27 is text (first character of the selector is \samp{0}), lines are
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
28 terminated by CRLF, and the data is terminated by a line consisting of
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
29 a single \samp{.}, and a leading \samp{.} should be stripped from
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
30 lines that begin with \samp{..}. Directory listings (first charactger
31777622ae93 some new material
Guido van Rossum <guido@python.org>
parents: 2576
diff changeset
31 of the selector is \samp{1}) are transferred using the same protocol.