<[EMAIL PROTECTED]> wrote

> Is there a way to set a timeout interval when executing with a
> re.search ? Sometimes (reason being maybe a "bad" pattern),
> the search takes forever and beyond...

not directly.  the only reliable way is to run it in a separate process,
and use the resource module to set necessary limits.

(to figure out if an expression can take lots of time, look for nested
repeats.  analyzing the output from sre_parse.parse(pattern) makes
that relatively easy).

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to