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

2009-01-31 Thread Hongyi Zhao
On Sat, 31 Jan 2009 04:10:39 -0200, "Gabriel Genellina" wrote: >En Fri, 30 Jan 2009 12:53:33 -0200, Hongyi Zhao >escribi$)A(.: > >>> See the following errors I in my case: >>> >>> $ python >>> 'import site' failed; use -v for traceback > >> import socket >>> Traceback (most recent call

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

2009-01-30 Thread Gabriel Genellina
En Fri, 30 Jan 2009 12:53:33 -0200, Hongyi Zhao escribió: See the following errors I in my case: $ python 'import site' failed; use -v for traceback import socket Traceback (most recent call last): File "", line 1, in ImportError: No module named socket Those errors indicate that Pyt

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

2009-01-30 Thread Hongyi Zhao
On Fri, 30 Jan 2009 22:48:00 +0800, Hongyi Zhao wrote: >On Fri, 30 Jan 2009 05:41:29 -0800 (PST), Jeff McNeil > wrote: >[snipped] >>Why not just use socket.gethostbyname? >> >>Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49) >>[GCC 4.3.2] on linux2 >>Type "help", "copyright", "credits" or "licens

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

2009-01-30 Thread Hongyi Zhao
On Fri, 30 Jan 2009 05:41:29 -0800 (PST), Jeff McNeil wrote: [snipped] >Why not just use socket.gethostbyname? > >Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49) >[GCC 4.3.2] on linux2 >Type "help", "copyright", "credits" or "license" for more information. import socket socket.gethostby

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

2009-01-30 Thread Jeff McNeil
On Jan 30, 7:33 am, Chris Rebert wrote: > On Fri, Jan 30, 2009 at 4:27 AM, Hongyi Zhao 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.23

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

2009-01-30 Thread Chris Rebert
On Fri, Jan 30, 2009 at 4:27 AM, Hongyi Zhao 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

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

2009-01-30 Thread Hongyi Zhao
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 -