像grep一样,但在docstring中搜索匹配项。
docgrep的Python项目详细描述
类似于grep,但只搜索docstring(在python代码中)。
安装
来自PIP:
$ pip install --upgrade docgrep
示例
$ docgrep 'Python 3.4' . ./asyncio/futures.py:113: """This class is *almost* compatible with concurrent.futures.Future. Differences: - result() and exception() do not take a timeout argument and raise an exception when the future isn't done yet. - Callbacks registered with add_done_callback() are always called via the event loop's call_soon_threadsafe(). - This class is not compatible with the wait() and as_completed() methods in the concurrent.futures package. (In Python 3.4 or later we may be able to unify the implementations.) """