How to get local ip address python?

后端 未结 0 835
太阳男子
太阳男子 2021-01-12 07:24

There\'s a code I found in internet that says it gives my machines local network IP address:

hostname = socket.gethostname()
local_ip = socket.gethostbyname(h         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题