DNS lookup

Stephen Coursen coursesm at sbdhcp-4024.statenisland-ny.est.tcg.com
Thu Dec 16 09:57:53 EST 1999


On 16 Dec 1999 09:54:32 -0500, Michael Spalinski <mspal at sangria.harvard.edu>
wrote:
>
>Is there a module which would let me do something like
>
>nslookup('132.151.1.90')
>
>and get the string 'parrot.python.org'?
>
How about socket.gethostbyaddr ?

>>> import socket
>>> socket.gethostbyaddr( "127.0.0.1" )
('localhost', ['localhost.localdomain'], ['127.0.0.1'] )
>>>


Steve

>
>M.
>
>



More information about the Python-list mailing list