Message197085
I found this in the netaddr module when I was trying to get the CIDR from a number of ip/netmask combinations. The expected cidr in the example below should be: 192.1.0.0/23.
>>> ip = netaddr.IPNetwork("192.1.1.128", "255.255.254.0")
>>> ip.netmask
IPAddress('255.255.255.0')
>>> ip.cidr
IPNetwork('192.1.1.0/24') |
|
Date |
User |
Action |
Args |
2013-09-06 18:14:05 | mryding | set | recipients:
+ mryding |
2013-09-06 18:14:05 | mryding | set | messageid: <1378491245.37.0.748278475446.issue18947@psf.upfronthosting.co.za> |
2013-09-06 18:14:05 | mryding | link | issue18947 messages |
2013-09-06 18:14:05 | mryding | create | |
|