index_scribe.py 文件源码

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

项目:piwheels 作者: bennuttall 项目源码 文件源码
def setup_output_path(self):
        """
        Called on task startup to copy all static resources into the output
        path (and to make sure the output path exists as a directory).
        """
        self.logger.info('setting up output path')
        try:
            self.output_path.mkdir()
        except FileExistsError:
            pass
        try:
            (self.output_path / 'simple').mkdir()
        except FileExistsError:
            pass
        for filename in resource_listdir(__name__, 'static'):
            with (self.output_path / filename).open('wb') as f:
                source = resource_stream(__name__, 'static/' + filename)
                f.write(source.read())
                source.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号