Get all the external IP addresses of a host
===

The other questions aren't quite the same.

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:

    ifconfig | grep 'inet addr:' | grep -v 127.0.0.1 | cut -d: -f2 | awk '{ print $1}'