在python中找到我的IP地址

时间:2011-06-23 10:59:18

标签: python networking ip

  

可能重复:
  Finding local IP addresses using Python's stdlib

如何获取IP地址?

socket.gethostbyname( socket.gethostname() )  

这是返回127.0.1.1,但我怎样才能获得真正的IP?

0 个答案:

没有答案
相关问题