def dgrep(pat,*opts):

    return grep(pat,dir(__main__)+dir(__main__.__builtins__),*opts)
Return grep() on dir()+dir(__builtins__).
dataset/ETHPy150Open ipython/ipython-py3k/IPython/utils/text.py/dgrep