pygrep

Find Python identifiers
Download

pygrep Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MPL
  • Price:
  • FREE
  • Publisher Name:
  • Axel Hecht
  • Publisher web site:
  • http://developer.mozilla.org/

pygrep Tags


pygrep Description

pygrep is a Python module to find Python identifiers in a set of directories.Ever tried to refactor some python code and trying to find out where you're code is used?find . -name \*.py | xargs grep foo.baris kinda nice, but it'll find imports, comments, and whatnot.Meet pygrep, it allows you to find all references to your code,pygrep foo.bar some/dir other/stuff.pyThat will show you some output likefile.py(Class.function):lineno foo.bar.full.identifierIn file.py, there's a reference to foo.bar.full.identifier in the method function in class Class.SupportedAt this point, pygrep resolvesfrom foo import barandfrom foo import bar as bazExampleGiven this python file foo.pyfrom mymod.bar import stuff as aclass A: def m(self): b = a.mod.method()all the following commandspygrep mymod foo.pypygrep mymod.bar foo.pypygrep mymod.bar.mod foo.pypygrep mymod.bar.mod.method foo.pywill returnfoo.py(A.m):4 mymod.bar.mod.methodProduct's homepage


pygrep Related Software