from __future__ import print_function
import socket
import sys
import os

filename=sys.argv[1]
txt=open(filename,"rb+")
filesize=os.path.getsize(filename)
i=1
while i<=filesize:
  data=txt.read(1)
  print ("%4s"%str(hex(ord(data)))+' ',end='')
  if i>0 and i%10==0:
     print ('')
  i+=1
472| 932| 800| 662| 466| 936| 462| 197| 324| 773|