python ip和int 互转函数 - thh
thh
·
2007-07-05
·
via 博客园 - thh
def Ip2Int(ip): import struct,socket return struct.unpack("!I",socket.inet_aton(ip))[0]def Int2Ip(i): import socket,struct return socket.inet_ntoa(struct.pack("!I",i))
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。