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)
experiment_logger.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录