title: List of IP addresses/hostnames from local network in Python
body: <p>How can I get a list of the IP addresses or host names from a local network easily in Python?</p>
  
  <p>It would be best if it was multi-platform, but it needs to work on Mac OS X first, then others follow.</p>
  
  <p><strong>Edit:</strong> By local I mean all <strong>active</strong> addresses within a local network, such as <code>192.168.xxx.xxx</code>.</p>
  
  <p>So, if the IP address of my computer (within the local network) is <code>192.168.1.1</code>, and I have three other connected computers, I would want it to return the IP addresses <code>192.168.1.2</code>, <code>192.168.1.3</code>, <code>192.168.1.4</code>, and possibly their hostnames.</p>