Standard module uu

uu

This module encodes and decodes files in uuencode format, allowing arbitrary binary data to be transferred over ascii-only connections. Whereever a file argument is expected, the methods accept either a pathname ('-' for stdin/stdout) or a file-like object.

Normally you would pass filenames, but there is one case where you have to open the file yourself: if you are on a non-unix platform and your binary file is actually a textfile that you want encoded unix-compatible you will have to open the file yourself as a textfile, so newline conversion is performed.

This code was contributed by Lance Ellinghouse, and modified by Jack Jansen.

The uu module defines the following functions:


\begin{funcdesc}{encode}{in_file\, out_file\optional{\, name\, mode}}
Uuencode f...
... from \var{in_file}, or \code{'-'} and \code{0666}
respectively.
\end{funcdesc}


\begin{funcdesc}{decode}{in_file\optional{\, out_file\, mode}}
This call decodes...
...\var{out_file} and \var{mode} are taken from
the uuencode header.
\end{funcdesc}