将IPv6字符串转换为字节+ python

时间:2011-04-08 16:55:03

标签: python

就像我们使用socket.inet_aton()转换Ipv4字符串一样,有没有办法在Windows中转换IPv6地址字符串。

函数socket.inet_pton()仅适用于Unix。

那么在Windows和python 2.6 ???

上还有其他方法可以做到这一点

1 个答案:

答案 0 :(得分:2)

IPy可以进行各种IP地址操作。

此外,inet_pton()Windows Vista起可用,但Python也会针对旧版本。