Danny Yoo wrote:
Hi Joe,
That actually sounds right in a sense. Any internet address with
'192.168.x.x' is a "local" IP address, and is commonly allocated to folks
on an internal network. For the really dull details about this, see RFC
1918 on "Private Address Space":
http://www.faqs
> >I think you're looking for socket.gethostbyname().
> >
> >http://www.python.org/doc/lib/module-socket.html#l2h-2594
> >
> >Here's an example using the socket.gethostbyname() function:
> >
> >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/335890
> >
> >
> Oh.. btw I don't think
Danny Yoo wrote:
>On Fri, 5 Aug 2005, Joseph Quigley wrote:
>
>
>
>>Is it possible to get my internet and/or network IP address from Python?
>>Is there any other way to get it?
>>
>>
>
>Hi Joe,
>
>I think you're looking for socket.gethostbyname().
>
>http://www.python.org/doc/lib/module-
Thanks.. I hoped python had something like that!!!
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Fri, 5 Aug 2005, Joseph Quigley wrote:
> Is it possible to get my internet and/or network IP address from Python?
import socket
ipaddr = socket.gethostbyname(socket.gethostname())
Some users report this gives a meaningless '127.0.0.1' (i.e., localhost),
though. But try it and see. It work
On Fri, 5 Aug 2005, Joseph Quigley wrote:
> Is it possible to get my internet and/or network IP address from Python?
> Is there any other way to get it?
Hi Joe,
I think you're looking for socket.gethostbyname().
http://www.python.org/doc/lib/module-socket.html#l2h-2594
Here's an example
Is it possible to get my internet and/or network IP address from Python?
Is there any other way to get it?
Oh. If you're wondering what I mean by Internet and/or network IP I'm
talking about the 4 sequence IP (IPv4) (used primarily in small
networks) and
the 6 sequence IP (IPv6) found on the inte