facundo@expiron:~/devel/reps/python/trunk$ ./python Python 2.6a0 (trunk, Jun 6 2007, 12:32:23) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import urllib2 u = urllib2.urlopen("http://www.taniquetil.com.ar/plog") u.headers.items() [..., ('content-type', 'text/html;charset=iso-8859-1'), ...]
u = urllib2.urlopen("http://www.taniquetil.com.ar/plog", timeout=3) Traceback (most recent call last): ... urllib2.URLError: <urlopen error timed out>
Ok, my blog is a bit slow, but the timeout is working ok, :D
Regards,
-- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/