how to get my internet ip address?
MaximilianScherr at T-Online.de
Sat Jan 26 12:30:30 CET 2002
using python2.1 at the moment, is it in there?
--- In python-list at y..., "Joshua Muskovitz" <joshm at t...> wrote:
> This might be of interest to you for use on your gateway machine:
> import socket
> hostname = socket.gethostname()
> addresses = socket.getaddrinfo(hostname, None)
> ips = [x for x in addresses]
> This should give you all of the IP addresses for your machine. You
> then have to determine which one was out to the universe, of course.
> # Joshua Muskovitz
> # joshm at t...
> def lyyrs(sig): return '-'.join(sig.split()+["ly y'rs"])
> lyyrs('Hire me! I need the work!')
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
More information about the Python-list