Updated for 2.1a3
[python/dscho.git] / Doc / lib / libuu.tex
blobea4a9e49f5c39f5124dae96713a01b333d4f3ea8
1 \section{\module{uu} ---
2 Encode and decode uuencode files}
4 \declaremodule{standard}{uu}
5 \modulesynopsis{Encode and decode files in uuencode format.}
6 \moduleauthor{Lance Ellinghouse}{}
9 This module encodes and decodes files in uuencode format, allowing
10 arbitrary binary data to be transferred over ascii-only connections.
11 Wherever a file argument is expected, the methods accept a file-like
12 object. For backwards compatibility, a string containing a pathname
13 is also accepted, and the corresponding file will be opened for
14 reading and writing; the pathname \code{'-'} is understood to mean the
15 standard input or output. However, this interface is deprecated; it's
16 better for the caller to open the file itself, and be sure that, when
17 required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS.
19 This code was contributed by Lance Ellinghouse, and modified by Jack
20 Jansen.
21 \index{Jansen, Jack}
22 \index{Ellinghouse, Lance}
24 The \module{uu} module defines the following functions:
26 \begin{funcdesc}{encode}{in_file, out_file\optional{, name\optional{, mode}}}
27 Uuencode file \var{in_file} into file \var{out_file}. The uuencoded
28 file will have the header specifying \var{name} and \var{mode} as the
29 defaults for the results of decoding the file. The default defaults
30 are taken from \var{in_file}, or \code{'-'} and \code{0666} respectively.
31 \end{funcdesc}
33 \begin{funcdesc}{decode}{in_file\optional{, out_file\optional{, mode}}}
34 This call decodes uuencoded file \var{in_file} placing the result on
35 file \var{out_file}. If \var{out_file} is a pathname, \var{mode} is
36 used to set the permission bits if the file must be created. Defaults
37 for \var{out_file} and \var{mode} are taken from the uuencode header.
38 \end{funcdesc}
41 \begin{seealso}
42 \seemodule{binascii}{Support module containing \ASCII-to-binary
43 and binary-to-\ASCII{} conversions.}
44 \end{seealso}