Getting local IP address...

shindich at my-deja.com.bbs shindich at my-deja.com.bbs
Mon Jul 17 13:40:02 EDT 2000


In article <8ko8qr$7cd$1 at nnrp1.deja.com>,
  Stephen Hansen <stephen at cerebralmaelstrom.com> wrote:
> 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.
>
Try this:
   import socket
   socket.gethostbyname (socket.gethostname ())

I hope this helps!
Alex Shindich
http://www.shindich.com/


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list