Re: python urllib2 timeout problem

2015-06-09 Thread mudongliang
On 06/09/2015 06:17 PM, Javier Barroso wrote: Hello, Sorry if you dont want to be in "to" .. El 9/6/2015 10:44 a. m., "mudongliang" > escribió: > > I wonder whether this is a bug for python urllib2. > The following is the code I used: > > target = pro

Re: python urllib2 timeout problem

2015-06-09 Thread Javier Barroso
Hello, Sorry if you dont want to be in "to" .. El 9/6/2015 10:44 a. m., "mudongliang" escribió: > > I wonder whether this is a bug for python urllib2. > The following is the code I used: > > target = protocol + "://" + location + directory + target_file > start = datetime.now() > try

python urllib2 timeout problem

2015-06-09 Thread mudongliang
I wonder whether this is a bug for python urllib2. The following is the code I used: target = protocol + "://" + location + directory + target_file start = datetime.now() try: urlrequest = urllib2.Request(target) urlresponse = urllib2.urlopen(urlrequest, timeout=4)