Did I find the right examples for you? yes no

All Samples(10)  |  Call(5)  |  Derive(0)  |  Import(5)
Convert a binary buffer into a hexadecimal representation.
    

        def hexdump(data):
    """Convert a binary buffer into a hexadecimal representation.
    """
    LOGFILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or \
                       '.' for x in range(256)])
    src = ''.join(data)
    length = 16
    result=[]
    for i in xrange(0, len(src), length):
       s = src[i:i+length]
       hexa = ' '.join(["%02x"%ord(x) for x in s])
       printable = s.translate(LOGFILTER)
       result.append("%06x   %-*s   %s\n" % \
                     (i, length*3, hexa, printable))
    return ''.join(result)
        


src/p/y/pykmaze-HEAD/pykmaze/keymaze.py   pykmaze(Download)
#-----------------------------------------------------------------------------
 
from util import hexdump, inttime
import datetime
import struct
            sys.stdout.flush()
            if start < len(resp):
                self.log.error("Remaining bytes: %s" % hexdump(resp[start:]))
        print ''
        return tp
            self._drain()
            if debug:
                self.log.debug("Write:\n%s" % hexdump(req))
            self._port.write(req)
            resp_h = self._port.read(3)
            if len(resp_h) < 3:
                continue
            (cmd, resp_len) = struct.unpack('>BH', resp_h)
            if cmd not in accept:
                self.log.error('Unexpected response %s' % hexdump(resp_h))
        cksum = self._port.read(1)
        if debug:
            self.log.debug("Read:\n%s" % hexdump(resp))
        self._port.timeout = 1
        if not len(cksum):

src/p/y/pymobiledevice-HEAD/afc.py   pymobiledevice(Download)
from cmd import Cmd
import os
from util import hexdump, parsePlist
from pprint import pprint
import plistlib
        if l:
            z = z[:l]
        hexdump(z)
 
    def do_mkdir(self, p):

src/p/y/pymobiledevice-HEAD/util/bdev.py   pymobiledevice(Download)
import os
import sys
from util import sizeof_fmt, hexdump
from progressbar import ProgressBar
from crypto.aes import AESdecryptCBC, AESencryptCBC

src/p/y/pymobiledevice-HEAD/mobilebackup2.py   pymobiledevice(Download)
from pprint import pprint
#from util import makedirs, read_file, 
from util import write_file, hexdump
#from util.bplist import BPlistReader
from biplist import writePlist, readPlist, Data

src/p/y/pymobiledevice-HEAD/syslog.py   pymobiledevice(Download)
from lockdown import LockdownClient
from datetime import datetime
from util import getHomePath
from util import hexdump
from sys import exit