Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libgopherlib.tex @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | 85cf476657c5 |
| children | f4a01c405a44 |
| rev | line source |
|---|---|
| 8918 | 1 \section{\module{gopherlib} --- |
|
10685
85cf476657c5
Reference to urllib module can be a hyperlink.
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
2 Gopher protocol client} |
|
85cf476657c5
Reference to urllib module can be a hyperlink.
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
3 |
|
8716
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
4 \declaremodule{standard}{gopherlib} |
|
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
5 \modulesynopsis{Gopher protocol client (requires sockets).} |
|
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
6 |
|
7036
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
7 \indexii{Gopher}{protocol} |
|
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
|
8 |
| 2596 | 9 This module provides a minimal implementation of client side of the |
|
10685
85cf476657c5
Reference to urllib module can be a hyperlink.
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
10 the Gopher protocol. It is used by the module \refmodule{urllib} to |
|
85cf476657c5
Reference to urllib module can be a hyperlink.
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
11 handle URLs that use the Gopher protocol. |
| 2596 | 12 |
| 13 The module defines the following functions: | |
| 14 | |
|
7036
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
15 \begin{funcdesc}{send_selector}{selector, host\optional{, port}} |
| 2596 | 16 Send a \var{selector} string to the gopher server at \var{host} and |
|
7036
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
17 \var{port} (default \code{70}). Returns an open file object from |
|
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
18 which the returned document can be read. |
| 2596 | 19 \end{funcdesc} |
| 20 | |
|
7036
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
21 \begin{funcdesc}{send_query}{selector, query, host\optional{, port}} |
| 2596 | 22 Send a \var{selector} string and a \var{query} string to a gopher |
|
7036
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
23 server at \var{host} and \var{port} (default \code{70}). Returns an |
|
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
24 open file object from which the returned document can be read. |
| 2596 | 25 \end{funcdesc} |
| 26 | |
| 27 Note that the data returned by the Gopher server can be of any type, | |
| 28 depending on the first character of the selector string. If the data | |
| 29 is text (first character of the selector is \samp{0}), lines are | |
| 30 terminated by CRLF, and the data is terminated by a line consisting of | |
| 31 a single \samp{.}, and a leading \samp{.} should be stripped from | |
|
7036
d0a97014ed42
Added index entry for the protocol.
Fred Drake <fdrake@acm.org>
parents:
5818
diff
changeset
|
32 lines that begin with \samp{..}. Directory listings (first character |
| 2596 | 33 of the selector is \samp{1}) are transferred using the same protocol. |
