Getting external IP address
cousinstanley at hotmail.com
Tue Mar 6 19:47:43 CET 2007
> I have a PC behind a firewall, and I'm trying to programmatically
> determine the IP address visible from outside the firewall.
Following is another alternative that might at least
be worth consideration ....
I use the lynx command shown as a command-line alias
under Debian linux ....
>>> import os
>>> pipe_in = os.popen( 'lynx --dump http://checkip.dyndns.org' )
>>> ip_addr = pipe_in.readlines()
>>> for this in ip_addr :
... print this
Current IP Address: 18.104.22.168
Stanley C. Kitching
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
More information about the Python-list