parameters: (dump)
return_statement: return ''.join(res)
docstring: Very helpful when debugging.
docstring_summary: Very helpful when debugging.
docstring_tokens: Very helpful when debugging .
function: def hexDump(dump):
          """Very helpful when debugging."""
          length = len(dump)
          P = lambda z: ((ord(z) >= 0x21 and ord(z) <= 0x7e) and [z] or ['.'])[0]
          ROWLEN = 18
          res = ['\n']
          for j in xrange(length // ROWLEN + int(length % ROWLEN > 0)):
              row = dump[j * ROWLEN:(j + 1) * ROWLEN]
              if isinstance(row, list):
                  row = ''.join(row)
              res.append(
              ('%02X ' * len(row) + '   ' * (ROWLEN - len(row)) + '| %s\n') % \
                  tuple(map(ord, list(row)) + [''.join(map(P, row))]))
          return ''.join(res)
function_tokens: def hexDump ( dump ) : length = len ( dump ) P = lambda z : ( ( ord ( z ) >= 0x21 and ord ( z ) <= 0x7e ) and [ z ] or [ '.' ] ) [ 0 ] ROWLEN = 18 res = [ '\n' ] for j in xrange ( length // ROWLEN + int ( length % ROWLEN > 0 ) ) : row = dump [ j * ROWLEN : ( j + 1 ) * ROWLEN ] if isinstance ( row , list ) : row = '' . join ( row ) res . append ( ( '%02X ' * len ( row ) + '   ' * ( ROWLEN - len ( row ) ) + '| %s\n' ) % tuple ( map ( ord , list ( row ) ) + [ '' . join ( map ( P , row ) ) ] ) ) return '' . join ( res )