Python to tell what is the IP of my PC .
Tim Williams
tim at tdw.net
Wed Nov 8 19:00:04 EST 2006
On 8 Nov 2006 15:35:31 -0800, NicolasG <nicolasg at gmail.com> 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) ?
The router will the PC's default gateway IP address, if you are on a
windows platform, you can view it by typing IPCONFIG (enter) from a
command prompt.
A quick google, gave me this, look at the comments at the end for an
example of finding the Default Gateway IP address using Python
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162994
HTH :)
More information about the Python-list
mailing list