Summary of methods for Python to obtain local IP address under windows and Linux

From , 3 Years ago, written in Python, viewed 92 times.
URL https://pastebin.vip/view/b4768289
  1. import socket
  2. localIP = socket.gethostbyname(socket.gethostname())#得到本地ip
  3. print "local ip:%s "%localIP
  4.  
  5.  

Reply to "Summary of methods for Python to obtain local IP address under windows and Linux"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website