search speed
alex23
wuwei23 at gmail.com
Fri Jan 30 00:38:43 EST 2009
On Jan 30, 2:56 pm, r <rt8... at gmail.com> wrote:
> On Jan 29, 5:51 pm, anders <anders.u.pers... at gmail.com> wrote:
>
> > if file.findInFile("LF01"):
> > Is there any library like this ??
> > Best Regards
> > Anders
>
> Yea, it's called a for loop!
>
> for line in file:
> if "string" in line:
> do_this()
Which is what the OP is already doing:
> (Today i step line for line and check)
anders, you might have more luck with one of the text search libraries
out there:
PyLucene (although this makes Java a dependency): http://lucene.apache.org/pylucene/
Nucular: http://nucular.sourceforge.net/
mxTextTools: http://www.egenix.com/products/python/mxBase/mxTextTools/
More information about the Python-list
mailing list