On Nov 21, 2007 10:15 AM, Gilles Ganault <[EMAIL PROTECTED]> wrote:
> I know about socket.gethostbyname, but this relies on what's in
> /etc/hosts, and I'd rather have a more independent solution.

I might be missing something in your question, but on a Windows XP
machine, I can get the IP address of my machine using:
>>> from socket import gethostname, gethostbyname
>>> gethostbyname(gethostname())
'192.168.0.11'
>>>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to