使用python获取本地ip

import socket
ip = socket.gethostbyname(socket.gethostname())
print(ip)

 

posted @ 2017-10-12 09:34  西红柿牛腩  阅读(219)  评论(0编辑  收藏  举报