def hexDump(data):
 for i in range(len(data)):
  sys.stdout.write(('%2x ' % ord(data[i])))
  if (((i + 1) % 8) == 0):
   print repr(data[(i - 7):(i + 1)])
 if ((len(data) % 8) != 0):
  print (str.rjust('', 11), repr(data[(i - (len(data) % 8)):(i + 1)]))

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