On Sunday, September 1, 2013 2:03:56 PM UTC-7, Chris Angelico wrote:

> > I tried using netifaces (https://pypi.python.org/pypi/netifaces) which 
> > seems to rely on getifaddrs (according to the doc, I didn't check the 
> > source).  Again, it returns nearly instantaneously the correct IP address.
> 
> Perfect!
> 
> ChrisA

Not really for my use case -- it isn't that *I* want to know my public IP 
address, but rather that IPython wants to know it.  Of course I could patch 
IPython's source to use netifaces but that sounds like an overkill.

As it happens I found a better way: just add the proper entry to /etc/hosts.

Still, thanks for the suggestions.

Antony
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to