IPy 0.75

A Python class and tools for handling of IPv4 and IPv6 addresses and networks
IPy is a Python class and tools for handling of IPv4 and IPv6 addresses and networks. The script is similar to the Net::IP Perl module.

The IP class allows a comfortable parsing and handling for most notations in use for IPv4 and IPv6 Addresses and Networks. It was greatly inspired bei RIPE's Perl module NET::IP's interface but doesn't share the Implementation. It doesn't share non-CIDR netmasks, so funky stuff lixe a netmask 0xffffff0f can't be done here.

>>> from IPy import IP
>>> ip = IP('127.0.0.0/30')
>>> for x in ip:
... print x
...
127.0.0.0
127.0.0.1
127.0.0.2
127.0.0.3
>>> ip2 = IP('0x7f000000/30')
>>> ip == ip2
1
>>> ip.reverseNames()
['0.0.0.127.in-addr.arpa.', '1.0.0.127.in-addr.arpa.',
'2.0.0.127.in-addr.arpa.', '3.0.0.127.in-addr.arpa.']
>>> ip.reverseName()
'0-3.0.0.127.in-addr.arpa.'
>>> ip.iptype()
'PRIVATE'

last updated on:
April 12th, 2011, 12:39 GMT
price:
FREE!
developed by:
Victor Stinner
license type:
BSD License 
category:
ROOT \ System \ Networking

FREE!

In a hurry? Add it to your Download Basket!

user rating 20

UNRATED
2.3/5
 

0/5

What's New in This Release:
  • IP('::/0').netmask() gives IP('::') instead of IP('0.0.0.0')
read full changelog

Add your review!

SUBMIT