Getting local IP address...

Robert rhicks at rma.edu
Sat Jul 15 12:29:01 EDT 2000


>>> import socket
>>> ip = socket.gethostbyname(socket.gethostname())
>>> print ip

works for me...

Robert

"Stephen Hansen" <stephen at cerebralmaelstrom.com> wrote in message
news:8ko8qr$7cd$1 at nnrp1.deja.com...
> How do I go about getting my dynamic IP address? I want to make a
> little program to check periodically (daily or so) and log the results
> so I can determine how often my IP is getting shuffled. :)
>
> Thanks :)
>
> --Stephen
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list