I wrote a script to get 100 pages from a server. like below: 1:import httplib 2:conns = httplib.HTTPConnection("www.mytest.com") 3:conn.request("GET", "/")
sometimes a socket error was raised. File "D:\usr\bin\lib\httplib.py", line 627, in connect raise socket.error, msg socket.error: (10060, 'Operation timed out') how to catch this kind of error then retry the "GET" operation? btw: If I want to get many page on same server, which lib is the best choice? I only know httplib,urllib and urllib2. thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list