IP address to binary conversion

Rikard Bosnjakovic bos at hack.org
Thu Jun 14 02:29:41 EDT 2001


Jeroen Wolff wrote:

> Is there a way to make it unsigned? ( a 32 bits unsigned value needed)

Change "l" to "I" or "L" in the struct.unpack(), then you will get a
Python long integer.


-- 
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