Re: timeout in urllib.open()

2007-03-05 Thread Facundo Batista
Stefan Palme wrote: > is there a way to modify the time a call of > > urllib.open(...) > > waits for an answer from the other side? Have a tool I'm working on adding a socket_timeout parametero to urllib2.urlopen. Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http:

Re: timeout in urllib.open()

2007-02-25 Thread John J. Lee
[EMAIL PROTECTED] writes: > >> I believe this can only be set globally: > >> > >> import socket > >> socket.setdefaulttimeout(seconds) > > Stefan> Uuuh this is no solution for me, because the website-checking > Stefan> tool is part of a very very big application running i

Re: timeout in urllib.open()

2007-02-25 Thread skip
>> I believe this can only be set globally: >> >> import socket >> socket.setdefaulttimeout(seconds) Stefan> Uuuh this is no solution for me, because the website-checking Stefan> tool is part of a very very big application running in an Stefan> application server, so g

Re: timeout in urllib.open()

2007-02-23 Thread John J. Lee
Paul Rubin writes: > Stefan Palme <[EMAIL PROTECTED]> writes: > > is there a way to modify the time a call of > > > > urllib.open(...) > > > > waits for an answer from the other side? Have a tool which > > automatically checks a list of websites for certain content.

Re: timeout in urllib.open()

2007-02-23 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > This has recently been discussed on python-dev. It's likely that > certain libraries will acquire a timeout keyword argument in the next > release, but only if someone is concerned enough to develop the > appropriate patches - the principle appears t

Re: timeout in urllib.open()

2007-02-19 Thread Paul Rubin
Stefan Palme <[EMAIL PROTECTED]> writes: > is there a way to modify the time a call of > > urllib.open(...) > > waits for an answer from the other side? Have a tool which > automatically checks a list of websites for certain content. The > tool "hangs" when one of the contacted websites behaves

Re: timeout in urllib.open()

2007-02-19 Thread Steve Holden
Stefan Palme wrote: [Peter] I believe this can only be set globally: import socket socket.setdefaulttimeout(seconds) >>> [Stefan] >>> ... >>> But when there is a "default timeout" (as indicated by >>> the method name) - isn't there a "per-socket timeout" >>> too? >> [P

Re: timeout in urllib.open()

2007-02-19 Thread Stefan Palme
>>> [Peter] >>> I believe this can only be set globally: >>> >>> import socket >>> socket.setdefaulttimeout(seconds) >>> >> [Stefan] >> ... >> But when there is a "default timeout" (as indicated by >> the method name) - isn't there a "per-socket timeout" >> too? > > [Peter] > Yes, but it isn't as

Re: timeout in urllib.open()

2007-02-19 Thread Peter Otten
Stefan Palme wrote: (top-posting undone) [Peter] >> I believe this can only be set globally: >> >> import socket >> socket.setdefaulttimeout(seconds) [Stefan] > Uuuh this is no solution for me, because the > website-checking tool is part of a very very big > application running in an applicatio

Re: timeout in urllib.open()

2007-02-19 Thread Stefan Palme
Uuuh this is no solution for me, because the website-checking tool is part of a very very big application running in an application server, so globally setting the timeout may break a lot of other things... But when there is a "default timeout" (as indicated by the method name) - isn't there a "

Re: timeout in urllib.open()

2007-02-19 Thread Peter Otten
Stefan Palme wrote: > is there a way to modify the time a call of > > urllib.open(...) > > waits for an answer from the other side? Have a tool > which automatically checks a list of websites for > certain content. The tool "hangs" when one of the > contacted websites behaves badly and "never"

timeout in urllib.open()

2007-02-19 Thread Stefan Palme
Hi all, is there a way to modify the time a call of urllib.open(...) waits for an answer from the other side? Have a tool which automatically checks a list of websites for certain content. The tool "hangs" when one of the contacted websites behaves badly and "never" answers... Thanks and reg