Fred Drake | fc57619 | 1998-04-04 07:15:02 +0000 | [diff] [blame] | 1 | \section{Standard Module \module{binhex}} |
Fred Drake | 1aabe5e | 1998-02-19 18:29:18 +0000 | [diff] [blame] | 2 | \label{module-binhex} |
| 3 | \stmodindex{binhex} |
| 4 | |
| 5 | This module encodes and decodes files in binhex4 format, a format |
Fred Drake | fc57619 | 1998-04-04 07:15:02 +0000 | [diff] [blame] | 6 | allowing representation of Macintosh files in \ASCII{}. On the Macintosh, |
Fred Drake | 1aabe5e | 1998-02-19 18:29:18 +0000 | [diff] [blame] | 7 | both forks of a file and the finder information are encoded (or |
| 8 | decoded), on other platforms only the data fork is handled. |
| 9 | |
Fred Drake | fc57619 | 1998-04-04 07:15:02 +0000 | [diff] [blame] | 10 | The \module{binhex} module defines the following functions: |
Fred Drake | 1aabe5e | 1998-02-19 18:29:18 +0000 | [diff] [blame] | 11 | |
Fred Drake | cce1090 | 1998-03-17 06:33:25 +0000 | [diff] [blame] | 12 | \begin{funcdesc}{binhex}{input, output} |
Fred Drake | 1aabe5e | 1998-02-19 18:29:18 +0000 | [diff] [blame] | 13 | Convert a binary file with filename \var{input} to binhex file |
| 14 | \var{output}. The \var{output} parameter can either be a filename or a |
| 15 | file-like object (any object supporting a \var{write} and \var{close} |
| 16 | method). |
| 17 | \end{funcdesc} |
| 18 | |
Fred Drake | cce1090 | 1998-03-17 06:33:25 +0000 | [diff] [blame] | 19 | \begin{funcdesc}{hexbin}{input\optional{, output}} |
Fred Drake | 1aabe5e | 1998-02-19 18:29:18 +0000 | [diff] [blame] | 20 | Decode a binhex file \var{input}. \var{input} may be a filename or a |
| 21 | file-like object supporting \var{read} and \var{close} methods. |
| 22 | The resulting file is written to a file named \var{output}, unless the |
| 23 | argument is empty in which case the output filename is read from the |
| 24 | binhex file. |
| 25 | \end{funcdesc} |
| 26 | |
| 27 | \subsection{Notes} |
| 28 | There is an alternative, more powerful interface to the coder and |
| 29 | decoder, see the source for details. |
| 30 | |
| 31 | If you code or decode textfiles on non-Macintosh platforms they will |
Fred Drake | fc57619 | 1998-04-04 07:15:02 +0000 | [diff] [blame] | 32 | still use the Macintosh newline convention (carriage-return as end of |
Fred Drake | 1aabe5e | 1998-02-19 18:29:18 +0000 | [diff] [blame] | 33 | line). |
| 34 | |
Fred Drake | fc57619 | 1998-04-04 07:15:02 +0000 | [diff] [blame] | 35 | As of this writing, \function{hexbin()} appears to not work in all |
| 36 | cases. |