Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #55070
| References | <634fa158-1d15-4a7e-ac0f-7a3f57f55cc7@googlegroups.com> <mailman.481.1380544612.18130.python-list@python.org> <e76f9cfa-c8ad-4eee-86e3-1f0a0bffe646@googlegroups.com> |
|---|---|
| Date | 2013-09-30 22:56 +1000 |
| Subject | Re: DNS query against a specific server. |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.483.1380545808.18130.python-list@python.org> (permalink) |
On Mon, Sep 30, 2013 at 10:45 PM, Michel Albert <exhuma@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 not take an optional parameter for this task. gethostbyname is a simple function with not much flexibility. (You can't, for instance, look up a TXT record.) For anything more complex, you want a proper DNS implementation. 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 :) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
DNS query against a specific server. Michel Albert <exhuma@gmail.com> - 2013-09-30 04:42 -0700
Re: DNS query against a specific server. William Ray Wing <wrw@mac.com> - 2013-09-30 08:36 -0400
Re: DNS query against a specific server. Michel Albert <exhuma@gmail.com> - 2013-09-30 05:45 -0700
Re: DNS query against a specific server. Chris Angelico <rosuav@gmail.com> - 2013-09-30 22:56 +1000
Re: DNS query against a specific server. "Gisle Vanem" <gvanem@yahoo.no> - 2013-09-30 15:35 +0200
Re: DNS query against a specific server. Ervin Hegedüs <airween@gmail.com> - 2013-09-30 14:54 +0200
Re: DNS query against a specific server. Michel Albert <exhuma@gmail.com> - 2013-09-30 06:04 -0700
csiph-web