(inp, out)
hexbin(infilename, outfilename) - Decode binhexed file
hexbin(infilename, outfilename) - Decode binhexed file
hexbin ( infilename outfilename ) - Decode binhexed file
def hexbin(inp, out):
    """hexbin(infilename, outfilename) - Decode binhexed file"""
    ifp = HexBin(inp)
    finfo = ifp.FInfo
    if not out:
        out = ifp.FName

    ofp = io.open(out, 'wb')
    # XXXX Do translation on non-mac systems
    while True:
        d = ifp.read(128000)
        if not d: break
        ofp.write(d)
    ofp.close()
    ifp.close_data()

    d = ifp.read_rsrc(128000)
    if d:
        ofp = openrsrc(out, 'wb')
        ofp.write(d)
        while True:
            d = ifp.read_rsrc(128000)
            if not d: break
            ofp.write(d)
        ofp.close()

    ifp.close()
def hexbin ( inp , out ) : ifp = HexBin ( inp ) finfo = ifp . FInfo if not out : out = ifp . FName ofp = io . open ( out , 'wb' ) # XXXX Do translation on non-mac systems while True : d = ifp . read ( 128000 ) if not d : break ofp . write ( d ) ofp . close ( ) ifp . close_data ( ) d = ifp . read_rsrc ( 128000 ) if d : ofp = openrsrc ( out , 'wb' ) ofp . write ( d ) while True : d = ifp . read_rsrc ( 128000 ) if not d : break ofp . write ( d ) ofp . close ( ) ifp . close ( )