ASTsearch 0.2.0

ASTsearch is an intelligent search tool for Python code.

To get it:

pip install astsearch

To use it:

# astsearch pattern [path]
astsearch "?/?"  # Division operations in all files in the current directory
pattern

A search pattern, using ? as a wildcard to match anything. The pattern must be a valid Python statement once all ? wilcards have been replaced with a name.

path

A Python file or a directory in which to search. Directories will be searched recursively for .py and .pyw files.

-l, --files-with-matches

Output only the paths of matching files, not the lines that matched.

Contents:

See also

astpath
Search through ASTs using XPath syntax

Indices and tables