DNS query against a specific server.

2013-09-30 Thread Michel Albert
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

Re: DNS query against a specific server.

2013-09-30 Thread William Ray Wing
On Sep 30, 2013, at 7:42 AM, Michel Albert exh...@gmail.com wrote: 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,

Re: DNS query against a specific server.

2013-09-30 Thread Michel Albert
On Monday, 30 September 2013 14:36:34 UTC+2, William Ray Wing wrote: On Sep 30, 2013, at 7:42 AM, Michel Albert *** wrote: 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*

Re: DNS query against a specific server.

2013-09-30 Thread Ervin Hegedüs
Hello, On Mon, Sep 30, 2013 at 04:42:29AM -0700, Michel Albert wrote: 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,

Re: DNS query against a specific server.

2013-09-30 Thread Chris Angelico
On Mon, Sep 30, 2013 at 10:45 PM, Michel Albert exh...@gmail.com wrote: I know I may be splitting hairs. Any of the mentioned solutions are fine. But I am curious to see if something like this is not yet implemented in a more standard way. I was surprised to see that ``gethostbyname`` does

Re: DNS query against a specific server.

2013-09-30 Thread Michel Albert
On Monday, 30 September 2013 14:54:41 UTC+2, Ervin Hegedüs wrote: Hello, On Mon, Sep 30, 2013 at 04:42:29AM -0700, Michel Albert wrote: 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

Re: DNS query against a specific server.

2013-09-30 Thread Gisle Vanem
Chris Angelico ros...@gmail.com wrote: There are a few Python DNS modules. It means adding another dependency, but perhaps not as large as twisted. And of course, you could always manually send UDP packets and listen for responses, but that seems a little unnecessary :) Then there is pycares;