Bump version to 0.9.1.
[python/dscho.git] / Doc / lib / libbinhex.tex
blobe181798389c9c9f7159c39504a900252dfd8e282
1 \section{\module{binhex} ---
2 Encode and decode binhex4 files}
4 \declaremodule{standard}{binhex}
5 \modulesynopsis{Encode and decode files in binhex4 format.}
8 This module encodes and decodes files in binhex4 format, a format
9 allowing representation of Macintosh files in \ASCII{}. On the Macintosh,
10 both forks of a file and the finder information are encoded (or
11 decoded), on other platforms only the data fork is handled.
13 The \module{binhex} module defines the following functions:
15 \begin{funcdesc}{binhex}{input, output}
16 Convert a binary file with filename \var{input} to binhex file
17 \var{output}. The \var{output} parameter can either be a filename or a
18 file-like object (any object supporting a \method{write()} and
19 \method{close()} method).
20 \end{funcdesc}
22 \begin{funcdesc}{hexbin}{input\optional{, output}}
23 Decode a binhex file \var{input}. \var{input} may be a filename or a
24 file-like object supporting \method{read()} and \method{close()} methods.
25 The resulting file is written to a file named \var{output}, unless the
26 argument is omitted in which case the output filename is read from the
27 binhex file.
28 \end{funcdesc}
31 \begin{seealso}
32 \seemodule{binascii}{support module containing \ASCII{}-to-binary
33 and binary-to-\ASCII{} conversions}
34 \end{seealso}
37 \subsection{Notes \label{binhex-notes}}
39 There is an alternative, more powerful interface to the coder and
40 decoder, see the source for details.
42 If you code or decode textfiles on non-Macintosh platforms they will
43 still use the Macintosh newline convention (carriage-return as end of
44 line).
46 As of this writing, \function{hexbin()} appears to not work in all
47 cases.