Reputation: 16691
What is the easiest way of changing the server that is queryed againest when using dnspython Ive been using the following,
dns.resolver.query(hostname,type)
However from the documentation it appears you can only change the file it looks at for its resolver servers.
Any ideas ?
Upvotes: 0
Views: 1735
Reputation: 13606
Resolver
can load configuration either from the Windows registry or from /etc/resolv.conf
. If you want to configure dns server manually, don't read system configuration (create it with configure=False
) and configure it yourself.
Resolver
has the nameservers
property which is a list of DNS servers IPs (as strings).
Upvotes: 2