Python to tell what is the IP of my PC .

Gabriel Genellina gagsl-py at yahoo.com.ar
Wed Nov 8 21:09:07 EST 2006


At Wednesday 8/11/2006 21:18, Nicolas G wrote:

> > How can I use python to get the real IP address of my DSL router (when
> > my PC is part of the local home LAN) ?
>
><http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162994>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162994
>
>import
>  win32api raise the error "module not exsit"
>and
>socket.gethostbyname(name)the router doesn't have a hostname.

Use the small script in the recipe's comments section.


-- 
Gabriel Genellina
Softlab SRL 

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar



More information about the Python-list mailing list