experiment_logger.py 文件源码

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

项目:autolab_core 作者: BerkeleyAutomation 项目源码 文件源码
def copy_dirs(self, src_dirs_path, target_dirs):
        if not self.has_internal_dirs(target_dirs):
            raise Exception("Directory has not been constructed internally! {0}".format(target_dirs))

        target_dirs_path = self.dirs_to_path(target_dirs)
        if os.path.exists(target_dirs_path):
            if len(os.listdir(target_dirs_path)) > 0:
                raise Exception("Target path for copying directories is not empty! Got: {0}".format(target_dirs_path))
            else:
                os.rmdir(target_dirs_path)
        shutil.copytree(src_dirs_path, target_dirs_path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号