@conf.commands.register
def chexdump(x, dump=False):
 x = str(x)
 s = str(', '.join(map((lambda x: ('%#04x' % ord(x))), x)))
 if dump:
  return s
 else:
  print s

@ conf . commands . register def chexdump ( x , dump = False ) : x = str ( x ) s = str ( ', ' . join ( map ( ( lambda x : ( '%#04x' % ord ( x ) ) ) , x ) ) ) if dump : return s else : print s
build a per byte hexadecimal representation example: .