Trouble with getting remote Computer Name

Gerson Kurz gerson.kurz at t-online.de
Mon Feb 25 12:36:11 EST 2002


On 25 Feb 2002 10:24:02 -0800, matthias_j at lycos.com (Matthias Janes)
wrote:

>My Problem:
>
>I have the IP address of all the Servers in a VPN for instance
>(10.251.23.6,10.251.24.6, 10.251.25.6 and so on)
>
>How can I get from each Server the Name of the Server in python.

Example:

>>> socket.gethostbyname("www.google.com")
'216.239.37.101'
>>> socket.gethostbyaddr('216.239.37.101')[0]
'www.google.com'




More information about the Python-list mailing list