>>> [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
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 "
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
arghh.
Thanks for removing my blindness :)
-stefan-
On Thu, 18 Jan 2007 10:38:35 +, Roberto Bonvallet wrote:
> Stefan Palme wrote:
>>> using the "re" module of Python (2.3 and 2.4), I tried the following:
>>>
>>> import re
>>>
Just noticed, that it works when *compiling* the pattern:
import re
p = re.compile('X.*?Y', re.DOTALL)
print re.sub(p, 'Z', 'Xab\ncdY')
Still the question - my fault or a bug?
Best regards
-stefan-
On Thu, 18 Jan 2007 11:10:08 +0100, Stefan Palme wrote:
&
Hi all,
using the "re" module of Python (2.3 and 2.4), I tried the following:
import re
print re.sub('X.*?Y', 'Z', 'Xab\ncdY', re.DOTALL)
I wanted to replace
Xab
cdY
by a single "Z", but the "." in the pattern does not match the
included "\n".
When using the pattern "X(.|\n)*?Y" (ex