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
--
Demand Freedom! Use open and free protocols, standards, and software! |
-- http://mail.python.org/mailman/listinfo/python-list