def binhex(inp, out):
 finfo = getfileinfo(inp)
 ofp = BinHex(finfo, out)
 with io.open(inp, 'rb') as ifp:
  while True:
   d = ifp.read(128000)
   if (not d):
    break
   ofp.write(d)
  ofp.close_data()
 ifp = openrsrc(inp, 'rb')
 while True:
  d = ifp.read(128000)
  if (not d):
   break
  ofp.write_rsrc(d)
 ofp.close()
 ifp.close()

def binhex ( inp , out ) : finfo = getfileinfo ( inp ) ofp = BinHex ( finfo , out ) with io . open ( inp , 'rb' ) as ifp : while True : d = ifp . read ( 128000 ) if ( not d ) : break ofp . write ( d ) ofp . close_data ( ) ifp = openrsrc ( inp , 'rb' ) while True : d = ifp . read ( 128000 ) if ( not d ) : break ofp . write_rsrc ( d ) ofp . close ( ) ifp . close ( )
binhex: create binhex-encoded copy of a file .