Mercurial > cpython-lru_cache-weakref
annotate Doc/lib/libuu.tex @ 21467:4e35fa5d5708 legacy-trunk
Add documentation for the help() built-in; contributed by Ka-Ping Yee.
This is part of SF patch #494622.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Tue, 18 Dec 2001 16:31:08 +0000 |
| parents | 13f4ba055687 |
| children | 1a9f47885260 |
| rev | line source |
|---|---|
| 8918 | 1 \section{\module{uu} --- |
|
10255
0614e7f16741
More reasonable section titles.
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
2 Encode and decode uuencode files} |
|
0614e7f16741
More reasonable section titles.
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}{uu} |
|
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
5 \modulesynopsis{Encode and decode files in uuencode format.} |
|
10255
0614e7f16741
More reasonable section titles.
Fred Drake <fdrake@acm.org>
parents:
8918
diff
changeset
|
6 \moduleauthor{Lance Ellinghouse}{} |
|
8716
760dcf197048
Adjusted to use the new module synopsis support macros.
Fred Drake <fdrake@acm.org>
parents:
7877
diff
changeset
|
7 |
|
7390
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
8 |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
9 This module encodes and decodes files in uuencode format, allowing |
|
19348
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
10 arbitrary binary data to be transferred over ASCII-only connections. |
|
7390
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
11 Wherever a file argument is expected, the methods accept a file-like |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
12 object. For backwards compatibility, a string containing a pathname |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
13 is also accepted, and the corresponding file will be opened for |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
14 reading and writing; the pathname \code{'-'} is understood to mean the |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
15 standard input or output. However, this interface is deprecated; it's |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
16 better for the caller to open the file itself, and be sure that, when |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
17 required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS. |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
18 |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
19 This code was contributed by Lance Ellinghouse, and modified by Jack |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
20 Jansen. |
|
7870
6bc4f80725d6
Remove obsolete \setindexsubitem macro,
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
21 \index{Jansen, Jack} |
|
6bc4f80725d6
Remove obsolete \setindexsubitem macro,
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
22 \index{Ellinghouse, Lance} |
|
7390
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
23 |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
24 The \module{uu} module defines the following functions: |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
25 |
|
7870
6bc4f80725d6
Remove obsolete \setindexsubitem macro,
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
26 \begin{funcdesc}{encode}{in_file, out_file\optional{, name\optional{, mode}}} |
|
19348
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
27 Uuencode file \var{in_file} into file \var{out_file}. The uuencoded |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
28 file will have the header specifying \var{name} and \var{mode} as |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
29 the defaults for the results of decoding the file. The default |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
30 defaults are taken from \var{in_file}, or \code{'-'} and \code{0666} |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
31 respectively. |
|
7390
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
32 \end{funcdesc} |
|
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
33 |
|
7870
6bc4f80725d6
Remove obsolete \setindexsubitem macro,
Fred Drake <fdrake@acm.org>
parents:
7712
diff
changeset
|
34 \begin{funcdesc}{decode}{in_file\optional{, out_file\optional{, mode}}} |
|
19348
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
35 This call decodes uuencoded file \var{in_file} placing the result on |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
36 file \var{out_file}. If \var{out_file} is a pathname, \var{mode} is |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
37 used to set the permission bits if the file must be |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
38 created. Defaults for \var{out_file} and \var{mode} are taken from |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
39 the uuencode header. However, if the file specified in the header |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
40 already exists, a \exception{uu.Error} is raised. |
|
7390
223433038a47
Separate binhex and binuu documentation from binascii. Support better
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
41 \end{funcdesc} |
|
10718
fe1e98190af6
Added "See also" sections linking to binascii.
Fred Drake <fdrake@acm.org>
parents:
10255
diff
changeset
|
42 |
|
19348
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
43 \begin{excclassdesc}{Error}{} |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
44 Subclass of \exception{Exception}, this can be raised by |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
45 \function{uu.decode()} under various situations, such as described |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
46 above, but also including a badly formated header, or truncated |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
47 input file. |
|
13f4ba055687
Document that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw <barry@python.org>
parents:
15261
diff
changeset
|
48 \end{excclassdesc} |
|
10718
fe1e98190af6
Added "See also" sections linking to binascii.
Fred Drake <fdrake@acm.org>
parents:
10255
diff
changeset
|
49 |
|
fe1e98190af6
Added "See also" sections linking to binascii.
Fred Drake <fdrake@acm.org>
parents:
10255
diff
changeset
|
50 \begin{seealso} |
|
15261
bc4f89eefb04
Make all the \seemodule explanations consistent: start with a capitalized
Fred Drake <fdrake@acm.org>
parents:
10719
diff
changeset
|
51 \seemodule{binascii}{Support module containing \ASCII-to-binary |
|
bc4f89eefb04
Make all the \seemodule explanations consistent: start with a capitalized
Fred Drake <fdrake@acm.org>
parents:
10719
diff
changeset
|
52 and binary-to-\ASCII{} conversions.} |
|
10718
fe1e98190af6
Added "See also" sections linking to binascii.
Fred Drake <fdrake@acm.org>
parents:
10255
diff
changeset
|
53 \end{seealso} |
