def open_mkdir(filename, mode='wb', *args, **kwargs):
    if mode not in ('w', 'wb'):
        raise ValueError('utils.file.open expects to write.')
    (dirname, basename) = os.path.split(filename)
    os.makedirs(dirname)
    return open(filename, mode, *args, **kwargs)
Return grep() on dir()+dir(__builtins__).
dataset/ETHPy150Open ProgVal/Limnoria/src/utils/file.py/open_mkdir--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/utils/text.py/dgrep