We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The grep module

(Obsolete; removed in 2.0) This module provides different ways to search for text in text files.

The grep function takes a regular expression (using the old regex syntax, and a list of files to search.

Example: Using the grep module
# File: grep-example-1.py

import grep
import glob

grep.grep("\<rather\>", glob.glob("samples/*.txt"))
$ python grep-example-1.py
4: indentation, rather than delimiters, might become