Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
convert a string of octets to a string of hex digits
    

        def octetsToHex(octets):
    """ convert a string of octets to a string of hex digits
    """
    result = ''
    while octets:
        byte = octets[0]
        octets = octets[1:]
        result += "%.2x" % ord(byte)

    return result
        


src/l/i/libsnmp-2.0.5/lib/libsnmp/rfc1155.py   libsnmp(Download)
        input = map(ord, stream)
 
        if __debug__: log.debug('Decoding %s' % util.octetsToHex(stream) )
 
        self.value = 0L