title: Get all the external IP addresses of a host
body: <p>The other questions aren't quite the same.</p>
  
  <p>What I'm looking at achieving is a Python function which returns a list of all the IP addresses on a system, emulating the behaviour of:</p>
  
  <pre><code>ifconfig | grep 'inet addr:' | grep -v 127.0.0.1 | cut -d: -f2 | awk '{ print $1}'
  </code></pre>