pybit/Examples/Py2_ReadBlock.py
def read_next(m, cursor,
              length=None,
              asHex=True,
              rev=False,
              pr=False):
    """
    Read next input with specified length
    """

    start = cursor
    end = cursor + length
    out = m[start:end]

    if rev:
        out = out[::-1]

    if asHex:
        out = out.encode("hex")

    if pr:
        print "{0}-{1}: {2}".format(start, end, out)

    return out

    Read next input with specified length
    
Read next input with specified length
Read next input with specified length
def read_next(m, cursor,
              length=None,
              asHex=True,
              rev=False,
              pr=False):
    start = cursor
    end = cursor + length
    out = m[start:end]
    if rev:
        out = out[::-1]
    if asHex:
        out = out.encode("hex")
    if pr:
        print "{0}-{1}: {2}".format(start, end, out)
    return out
def read_next ( m , cursor , length = None , asHex = True , rev = False , pr = False ) : start = cursor end = cursor + length out = m [ start : end ] if rev : out = out [ : : - 1 ] if asHex : out = out . encode ( "hex" ) if pr : print "{0}-{1}: {2}" . format ( start , end , out ) return out
Read next input with specified length
Read next input with specified length
"""
    Read next input with specified length
    """
m
cursor
length
asHex
rev
pr