How can I get a list of the IP addresses or host names from a local network easily in Python?
It would be best if it was multi-platform, but it needs to work on Mac OS X first, then others follow.
Edit: By local I mean all active addresses within a local network, such as 192.168.xxx.xxx
.
So, if the IP address of my computer (within the local network) is 192.168.1.1
, and I have three other connected computers, I would want it to return the IP addresses 192.168.1.2
, 192.168.1.3
, 192.168.1.4
, and possibly their hostnames.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…