def process_all_files(result_file, file_names):
for source_path in (Path(n) for n in file_names):
detail_log.info("read {}".format(source_path))
with source_path.open() as source_file:
game_iter = yaml.load_all(source_file)
statistics = gather_stats(game_iter)
result_file.write(
yaml.dump(dict(statistics), explicit_start=True)
)
ch13_r06.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录