binhex
index
/usr/lib/python1.6/binhex.py

Macintosh binhex compression/decompression.
 
easy interface:
binhex(inputfilename, outputfilename)
hexbin(inputfilename, outputfilename)

 
Modules
            
binascii
os
string
struct
sys

 
Classes
            
BinHex
FInfo
HexBin
_Hqxcoderengine
_Hqxdecoderengine
_Rlecoderengine
_Rledecoderengine
openrsrc

 
class BinHex
       
  
__init__(self, (name, finfo, dlen, rlen), ofp)
_write(self, data)
_writecrc(self)
_writeinfo(self, name, finfo)
close(self)
close_data(self)
write(self, data)
write_rsrc(self, data)

 
class FInfo
       
  
__init__(self)

 
class HexBin
       
  
__init__(self, ifp)
_checkcrc(self)
_read(self, len)
_readheader(self)
close(self)
close_data(self)
read(self, *n)
read_rsrc(self, *n)

 
class _Hqxcoderengine
      Write data to the coder in 3-byte chunks
 
  
__init__(self, ofp)
_flush(self, force)
close(self)
write(self, data)

 
class _Hqxdecoderengine
      Read data via the decoder in 4-byte chunks
 
  
__init__(self, ifp)
close(self)
read(self, totalwtd)
Read at least wtd bytes (or until EOF)

 
class _Rlecoderengine
      Write data to the RLE-coder in suitably large chunks
 
  
__init__(self, ofp)
close(self)
write(self, data)

 
class _Rledecoderengine
      Read data via the RLE-coder
 
  
__init__(self, ifp)
_fill(self, wtd)
close(self)
read(self, wtd)

 
class openrsrc
       
  
__init__(self, *args)
close(self)
read(self, *args)
write(self, *args)

 
Functions
            
_test()
binhex(inp, out)
(infilename, outfilename) - Create binhex-encoded copy of a file
getfileinfo(name)
hexbin(inp, out)
(infilename, outfilename) - Decode binhexed file

 
Data
             Error = 'binhex.Error'
LINELEN = 64
REASONABLY_LARGE = 32768
RUNCHAR = '\220'
_DID_DATA = 1
_DID_HEADER = 0
_DID_RSRC = 2
__file__ = '/usr/lib/python1.6/binhex.pyc'
__name__ = 'binhex'