core.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:relocate-venv 作者: firedrakeproject 项目源码 文件源码
def main(src_dir, new_dir, map_d, archer):
    """ Call out the necessary functions."""

    print "Creating a copy of %s in %s" % (src_dir, new_dir)
    shutil.copytree(src_dir, new_dir, symlinks=False, ignore=shutil.ignore_patterns('*.pyc'))

    print "Changing the paths according to the mapping table."
    for key in map_d.keys():
        grep_and_sed(key, new_dir, map_d[key])

    fn = shutil.make_archive(new_dir, 'tar', new_dir)
    print "%s can now be copied elsewhere and used." %(fn)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号