标签:.net ast 5.0 rom res form host ip地址 work
In [
1
]: from netaddr
import
*
In [
2
]: ip = IPAddress(
‘172.16.100.39‘
)
ip.format()ip地址的格式化
‘172.16.100.39‘
repr(ip)
"IPAddress(‘172.16.100.39‘)"
ip = IPNetwork(
‘172.16.100.39/24‘
)
ip.network
IPAddress(
‘172.16.100.0‘
)
ip.broadcast
IPAddress(
‘172.16.100.255‘
)
ip.ip
IPAddress(
‘172.16.100.39‘
)
ip.size
256
ip.netmask
IPAddress(
‘255.255.255.0‘
)
ip.hostmask
IPAddress(
‘0.0.0.255‘
)
标签:.net ast 5.0 rom res form host ip地址 work
原文地址:http://www.cnblogs.com/daibigmonster/p/7944892.html