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