def swap32(value):
 value = long(value)
 return (((((value & 255L) << 24) | ((value & 65280L) << 8)) | ((value & 16711680L) >> 8)) | ((value & 4278190080L) >> 24))

def swap32 ( value ) : value = long ( value ) return ( ( ( ( ( value & 255 L ) << 24 ) | ( ( value & 65280 L ) << 8 ) ) | ( ( value & 16711680 L ) >> 8 ) ) | ( ( value & 4278190080 L ) >> 24 ) )
swap byte between big and little endian of a 32 bits integer .