config.py 文件源码

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

项目:audio-feeder 作者: pganssle 项目源码 文件源码
def from_file(cls, file_loc, **kwargs):
        if not os.path.exists(file_loc):
            raise IOError('File not found: {}'.format(file_loc))

        with open(file_loc, 'r') as yf:
            config = yaml.safe_load(yf)

        config.update(kwargs)

        return cls(config_loc_=file_loc, **config)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号