On Fri, Jan 30, 2009 at 4:27 AM, Hongyi Zhao <hongyi.z...@gmail.com> wrote: > Hi all, > > Suppose I've the entries like the following in my file: > > ------------------ > 116.52.155.237:80 > ip-72-55-191-6.static.privatedns.com:3128 > 222.124.135.40:80 > 217.151.231.34:3128 > 202.106.121.134:80 > 211.161.197.182:80 > hpc.be.itu.edu.tr:80 > static3-117-183.worldinternetworkcorporation.com:80 > ------------------ > > Now, I want to convert the domain name to IP by using a python script, > e.g., > > ip-72-55-191-6.static.privatedns.com:3128 > > should be converted into the following form: > > 72.55.191.6:3128 > > any hints on this?
PyDNS might be a helpful library for writing such a script -- http://pydns.sourceforge.net/ Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com -- http://mail.python.org/mailman/listinfo/python-list