DNS query against a specific server.

Michel Albert exhuma at gmail.com
Mon Sep 30 07:42:29 EDT 2013


Hi,

``socket.gethostbyname`` sends the DNS resolution query to the DNS server specified by the OS. Is there an easy way to send a query to a *different* server?

I see that twisted.names allows you to do this, but, having all of twisted as dependency to my project when all I need to do is a simple DNS query seems a bit extreme. I also found pydns, but that looks fairly outdated and unmaintained.

Is there not an actively maintained lightweight solution? If not, I will go with twisted.


Cheers,
Mich.



More information about the Python-list mailing list