Want to write a script to do the batch conversion from domain name to IP.

Hongyi Zhao hongyi.zhao at gmail.com
Fri Jan 30 07:27:37 EST 2009


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? 



More information about the Python-list mailing list