IP address to binary conversion
Rikard Bosnjakovic
bos at hack.org
Wed Jun 13 20:01:14 EDT 2001
Here's a solution for the reverse:
>>> socket.inet_ntoa(struct.pack("!I", long(1074015239)))
'64.4.44.7'
--
Rikard Bosnjakovic - http://bos.hack.org/cv/ - ICQ: 1158217
Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.
More information about the Python-list
mailing list