finding IP address of computer
Terry Reedy
tjreedy at udel.edu
Thu Apr 27 16:28:48 EDT 2006
"Grant Edwards" <grante at visi.com> wrote in message
news:12525ctc1ane5e5 at corp.supernews.com...
> On 2006-04-27, Gregor Horvath <g.horvath at gmx.at> wrote:
>> Chris schrieb:
>>> How do I find and print to screen the IP address of the computer my
>>> python program is working on?
>>>
>>
>> IP adresses are bound to network interfaces not to computers.
>> One Computer can have multiple network interfaces.
>
> And each interface can have any number if IP addresses
> (including none).
To answer the OP for typical situations: if you are accessing the internet
via a local network, the network administrator should be able to tell you.
In fact, for some networks, the IP address is part of the interface setup.
If the network is run by a router, it should be able to tell you. If you
are sitting behind a NAT (network address translation) router and you want
to know the external address, there are web pages that echo your externally
visible address back to you.
Terry Jan Reedy
More information about the Python-list
mailing list