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).
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
32 \seemodule{binascii
}{support module containing
\ASCII{}-to-binary
33 and binary-to-
\ASCII{} conversions
}
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
46 As of this writing,
\function{hexbin()
} appears to not work in all