source: trunk/essentials/dev-lang/python/Doc/lib/libbinhex.tex@ 3368

Last change on this file since 3368 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 1.9 KB
Line 
1\section{\module{binhex} ---
2 Encode and decode binhex4 files}
3
4\declaremodule{standard}{binhex}
5\modulesynopsis{Encode and decode files in binhex4 format.}
6
7
8This module encodes and decodes files in binhex4 format, a format
9allowing representation of Macintosh files in \ASCII. On the Macintosh,
10both forks of a file and the finder information are encoded (or
11decoded), on other platforms only the data fork is handled.
12
13The \module{binhex} module defines the following functions:
14
15\begin{funcdesc}{binhex}{input, output}
16Convert a binary file with filename \var{input} to binhex file
17\var{output}. The \var{output} parameter can either be a filename or a
18file-like object (any object supporting a \method{write()} and
19\method{close()} method).
20\end{funcdesc}
21
22\begin{funcdesc}{hexbin}{input\optional{, output}}
23Decode a binhex file \var{input}. \var{input} may be a filename or a
24file-like object supporting \method{read()} and \method{close()} methods.
25The resulting file is written to a file named \var{output}, unless the
26argument is omitted in which case the output filename is read from the
27binhex file.
28\end{funcdesc}
29
30The following exception is also defined:
31
32\begin{excdesc}{Error}
33Exception raised when something can't be encoded using the binhex