On Sep 26, 9:35 am, Stef Mientki <[EMAIL PROTECTED]> wrote:

> hello,
>
> I want to search multiple textfiles (python source files) for a specific
> word.
> I can find all files, open them and do a search,
> but I guess that will be rather slow.
>
> I couldn't find any relevant information through google.
>
> Does anyone know of a search library that performs this task fast ?
>
> If it indeed only concerns py-files,
> is there another way of searching words ?
> ( I could imagine that such a "py-only-search" would have benefits,
> because you could set a flag to see the words in comment yes or no )

If you're on *nix platform, you can use:

$ find -name "*py" | xargs egrep "\bword\b"

HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to