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 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
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to