2006/7/4, Guido van Rossum <[EMAIL PROTECTED]>: > > This affect all the sockets. > > So, assuming your app is single-threaded, set the timeout, call > urlopen(), and reset the timeout to None.
No, it's multithreaded, :D > > And I hit the problem when servicing > > information with a web service (TCPServer), and I need to timeout the > > connection of the URLOpen *only*. > > That's not so easy even if you were to have a timeout parameter to > urlopen(). You'd have to implement that peculiarity in all the layers > (in this case, urllib and httplib; and possibly ftplib, gopherlib etc. > :-) Yes, it's not SO easy, because, as you said, you have to dig into the layers until you hit the actual socket creation and modify the timeout for that socket only. That's why I think that this should be handled in the standard library and not left to implement to whoever will need it, :) -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com