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