def ser_uint256_be(u):
 rs = ''
 for i in xrange(8):
  rs += struct.pack('>I', (u & 4294967295L))
  u >>= 32
 return rs

def ser_uint256_be ( u ) : rs = '' for i in xrange ( 8 ) : rs += struct . pack ( '>I' , ( u & 4294967295 L ) ) u >>= 32 return rs
ser_uint256 to big endian .