将IPv6字符串转换为字节 + python
就像我们用 socket.inet_aton()
来把IPv4的字符串转换成地址一样,有没有办法在Windows上把IPv6地址的字符串转换呢?
不过,socket.inet_pton()
这个函数只在Unix系统上可以用。
那么在Windows和Python 2.6上,我还有其他方法可以做到这一点吗??
就像我们用 socket.inet_aton()
来把IPv4的字符串转换成地址一样,有没有办法在Windows上把IPv6地址的字符串转换呢?
不过,socket.inet_pton()
这个函数只在Unix系统上可以用。
那么在Windows和Python 2.6上,我还有其他方法可以做到这一点吗??