There is a function on mysql:
select inet_ntoa(4294967295 & '-1136577616');
res = 188.65.51.176
How to make a function on python?
Python 2.7.3
import socket, struct
packed_value = struct.pack('!I', 4294967295 & int('-1136577616'))
addr = socket.inet_ntoa(packed_value)
print addr
For Python 3.3+ see using inet_ntoa function in Python