James John – Software Engineer

Parsing and Fetching DNS Resolvers in /etc/resolv.conf Using Python

In an app development I needed to use my system resolvers which is different from my ISP default resolver, and Python keeps taking my ISP resolver. I decided to put up this simple function to get resolvers for me in /etc/resolv.conf, here is it:

https://github.com/donjajo/py-world/blob/master/resolvconfReader.py

I hope this helps

James John

Software Engineer