Getting externally-facing IP address?

Michael B. Trausch fd0man at gmail.com
Fri Nov 10 11:14:15 EST 2006


Hello,

Every programming example that I have seen thus far shows simple server
code and how to bind to a socket--however, every example binds to the
localhost address.  What I am wondering is this:  Is there a clean way
to get the networked IP address of the machine the code is running on?
For example, my laptop's IP address is 192.168.0.101, and I want to bind
a server to that address.  Is there a clean way of doing so that will
work, for example, when I move the code to my server (which obviously
doesn't have the same IP address)?

Thanks in advance.

    -- Mike

--
Michael B. Trausch
                    fd0man at gmail.com
Phone: (404) 592-5746
   Jabber IM: fd0man at livejournal.com

Demand Freedom!  Use open and free protocols, standards, and software!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061110/3827c039/attachment.html>


More information about the Python-list mailing list