home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
p
/
python
/
pyhtmldoc
/
b
/
binhex
< prev
next >
Wrap
Text File
|
1996-11-14
|
1KB
|
30 lines
<TITLE>binhex -- Python library reference</TITLE>
Next: <A HREF="../u/uu" TYPE="Next">uu</A>
Prev: <A HREF="../m/mimetools" TYPE="Prev">mimetools</A>
Up: <A HREF="../i/internet_and_www" TYPE="Up">Internet and WWW</A>
Top: <A HREF="../t/top" TYPE="Top">Top</A>
<H1>10.13. Standard module <CODE>binhex</CODE></H1>
This module encodes and decodes files in binhex4 format, a format
allowing representation of Macintosh files in ASCII. On the macintosh,
both forks of a file and the finder information are encoded (or
decoded), on other platforms only the data fork is handled.
<P>
The <CODE>binhex</CODE> module defines the following functions:
<P>
<DL><DT><B>binhex</B> (<VAR>input</VAR>, <VAR>output</VAR>) -- function of module binhex<DD>
Convert a binary file with filename <VAR>input</VAR> to binhex file
<VAR>output</VAR>. The <VAR>output</VAR> parameter can either be a filename or a
file-like object (any object supporting a <VAR>write</VAR> and <VAR>close</VAR>
method).
</DL>
<DL><DT><B>hexbin</B> (<VAR>input</VAR>[, <VAR>output</VAR>]) -- function of module binhex<DD>
Decode a binhex file <VAR>input</VAR>. <VAR>Input</VAR> may be a filename or a
file-like object supporting <VAR>read</VAR> and <VAR>close</VAR> methods.
The resulting file is written to a file named <VAR>output</VAR>, unless the
argument is empty in which case the output filename is read from the
binhex file.
</DL>
<H2>Menu</H2><DL COMPACT>
<DT><A HREF="../n/notes" TYPE=Menu>notes</A>
<DD></DL>