

def make_dir_struct(tag, base, out_base):
    'Make the directory structure of all files below a starting dir.\n\n    This is just a convenience routine to help build a nested directory\n    hierarchy because distutils is too stupid to do this by itself.\n\n    XXX - this needs a proper docstring!\n    '
    lbase = len(base)
    pathsep = os.path.sep
    lpathsep = len(pathsep)
    out = []
    for (dirpath, dirnames, filenames) in os.walk(base):
        dp_eff = dirpath[lbase:]
        if f.startswith(pathsep):
            dp_eff = dp_eff[lpathsep:]
        out_path = pjoin(out_base, dp_eff)
        pfiles = [pjoin(dirpath, f) for f in filenames]
        out.append((out_path, pfiles))
    return out

dataset/ETHPy150Open ipython/ipython-py3k/setupbase.py make_dir_struct/VarMisuse@70/181 `dp_eff`->`f`