会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
About Computer
博客园
首页
新随笔
新文章
联系
管理
订阅
python ip和int 互转函数
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))
posted on
2007-07-05 11:24
thh
阅读(
3913
) 评论(
0
)
收藏
举报
刷新页面
返回顶部
公告