IP address of webserver

Johny python at hope.cz
Sat Jan 27 12:24:50 EST 2007


How can I find server's IP address?
>From console I can use ping, for example:

C:\RobotP\cgi-bin>ping www.google.com

Pinging www.google.com [209.85.129.147] with 32 bytes of data:

Reply from 209.85.129.147: bytes=32 time=30ms TTL=244
Reply from 209.85.129.147: bytes=32 time=30ms TTL=244
..
..
So I know  that www.google.com has 209.85.129.147  IP address.
But how can I find it directly from Python script?
Thanks for help
J.




More information about the Python-list mailing list