<p>I have multiple Network Interface Cards on my computer, each with its own IP address.</p>

<p>When I use <code>gethostbyname(gethostname())</code> from Python's (built-in) <code>socket</code> module, it will only return one of them.  How do I get the others?</p>

You should directly obtain all IP configured IP addresses, e.g. by running ifconfig and parsing its output (it's also possible to do what
ifconfig does directly in Python
,
see how it is done in C
). If you want host names, use gethostbyaddr.