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
For OSX (and Linux), a simple solution is to use either os.popen or os.system and run the arp -a command.
arp -a
For example:
devices = [] for device in os.popen('arp -a'): devices.append(device)
This will give you a list of the devices on your local network.