Pick out ip-address

Patrick Useldinger p at trick.lu
Mon Feb 16 21:58:57 CET 2004

On Mon, 16 Feb 2004 13:19:22 +0100, Alexander Födisch
<foedisch at eva.mpg.de> wrote:

>Can somebody help me? I want to pick-out the IP-address after my pc is 
>connected with the internet.

What about:

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


More information about the Python-list mailing list