Public API

greppy: Recursively grep over Python files in the files in the given directory.

Functions:

greppy(pattern[, search_dir, summary, file])

Recursively grep over Python files in the files in the given directory, and search for pattern.

greppy(pattern, search_dir='.', *, summary=False, file=None)[source]

Recursively grep over Python files in the files in the given directory, and search for pattern.

Parameters
  • pattern (Union[Pattern, str]) – The pattern to search for.

  • search_dir (Union[str, Path, PathLike]) – The directory to search in. Default '.'.

  • summary (bool) – Show only a summary of the results. Default False.

  • file (Optional[IO]) – The output file descriptor. Defaults to sys.stdout.

Return type

Set[PathPlus]