def to_int_be(data):
 return reduce((lambda a, b: ((a << 8) + b)), bytearray(data), 0)

def to_int_be ( data ) : return reduce ( ( lambda a , b : ( ( a << 8 ) + b ) ) , bytearray ( data ) , 0 )
convert an arbitrarily-long string to a long using big-endian byte order .