[Python-Dev] Time-out in URL Open

Guido van Rossum guido at python.org
Mon Jul 3 23:06:02 CEST 2006


To fake things like this, socket.setdefaulttimeout() was added, though
I don't know if it actually works. Have you tried that?

--Guido

On 7/3/06, Facundo Batista <facundobatista at gmail.com> wrote:
> I need a timeout in urlopen, just to be able to make:
>
> >>> urllib2.urlopen("http://no.host.org", timeout=2)
>
> This is actually not possible, but I'll make it work.
>
> I want to know, please, if this is useful in general, for me to post a
> patch in SF.
>
> Regards,
>
> --
> .    Facundo
>
> Blog: http://www.taniquetil.com.ar/plog/
> PyAr: http://www.python.org/ar/
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list