python在Windows8下获取本机ip地址
import socket hostname = socket.gethostname() IPinfo = socket.gethostbyname_ex(hostname) LocalIP = IPinfo[2][2] print LocalIP
python在Windows8下获取本机ip地址
import socket hostname = socket.gethostname() IPinfo = socket.gethostbyname_ex(hostname) LocalIP = IPinfo[2][2] print LocalIP