code: def hexDump(bytes):
      
      for i in range(len(bytes)):
          sys.stdout.write("%2x " % (ord(bytes[i])))
          if (i+1) % 8 == 0:
              print repr(bytes[i-7:i+1])
  
      if(len(bytes) % 8 != 0):
          print string.rjust("", 11), repr(bytes[i-len(bytes)%8:i+1])
docs: Useful utility; prints the string in hexadecimal