blob: 41458233621336fafb1dfe2cee596d4fee5c833e [file] [log] [blame]
Fred Drake295da241998-08-10 19:42:37 +00001\section{\module{uu} ---
2 Encode and decode files in uuencode format.}
Fred Drakeb91e9341998-07-23 17:59:49 +00003\declaremodule{standard}{uu}
4
5\modulesynopsis{Encode and decode files in uuencode format.}
6
Fred Drake1aabe5e1998-02-19 18:29:18 +00007
8This module encodes and decodes files in uuencode format, allowing
9arbitrary binary data to be transferred over ascii-only connections.
10Wherever a file argument is expected, the methods accept a file-like
11object. For backwards compatibility, a string containing a pathname
12is also accepted, and the corresponding file will be opened for
13reading and writing; the pathname \code{'-'} is understood to mean the
14standard input or output. However, this interface is deprecated; it's
15better for the caller to open the file itself, and be sure that, when
16required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS.
17
18This code was contributed by Lance Ellinghouse, and modified by Jack
19Jansen.
Fred Drake61f45c71998-04-04 06:31:51 +000020\index{Jansen, Jack}
21\index{Ellinghouse, Lance}
Fred Drake1aabe5e1998-02-19 18:29:18 +000022
23The \module{uu} module defines the following functions:
24
Fred Drake61f45c71998-04-04 06:31:51 +000025\begin{funcdesc}{encode}{in_file, out_file\optional{, name\optional{, mode}}}
Fred Drake1aabe5e1998-02-19 18:29:18 +000026Uuencode file \var{in_file} into file \var{out_file}. The uuencoded
27file will have the header specifying \var{name} and \var{mode} as the
28defaults for the results of decoding the file. The default defaults
29are taken from \var{in_file}, or \code{'-'} and \code{0666}
30respectively.
31\end{funcdesc}
32
Fred Drake61f45c71998-04-04 06:31:51 +000033\begin{funcdesc}{decode}{in_file\optional{, out_file\optional{, mode}}}
Fred Drake1aabe5e1998-02-19 18:29:18 +000034This call decodes uuencoded file \var{in_file} placing the result on
35file \var{out_file}. If \var{out_file} is a pathname the \var{mode} is
36also set. Defaults for \var{out_file} and \var{mode} are taken from
37the uuencode header.
38\end{funcdesc}