On Sat, Jul 23, 2011 at 10:38 PM, Gavin <[email protected]> wrote: > Thank you, Casey! >
You're welcome. > By the way, where would I be able to find this in the documentation? Being a > mostly self-taught mostly-novice programmer I probably don't grok the > documentation as well as I could. > http://www.dnspython.org/docs/1.9.4/html/ Click "dns.resolver" in the "Table of Contents" frame, then select "Resolver" from the "module resolver" frame. The definitions for the instance variables for Resolver instances are spelled out on that page, including lifetime and timeout. You can also click "source code" next to the query() and _compute_timeout() methods to see what they do. > Is there also a way to specify a retry limit rather than a time limit? The > time limit works fine for what I need, but I am also curious about this now. > I don't know of one with the existing methods, but it sounds like it would be a useful option. Even if it isn't included in the source, however, it could be easily added by subclassing Resolver and overriding the query() method (for example). > And one last question - do you think using dnspython is suitable when I only > need a single A record? As I mentioned before socket.gethostbyname() has > been working fine as my workaround. Any reason to use one over the other? > I try to simplify where possible. Seems like gethostbyname() (or one of its variants) is probably sufficient for what you are doing. Regards, Casey _______________________________________________ dnspython-users mailing list [email protected] http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-users
