odsr.py 文件源码

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

项目:pyexcel-odsr 作者: pyexcel 项目源码 文件源码
def open_stream(self, file_stream, **keywords):
        """open ods file stream"""
        if not hasattr(file_stream, 'seek'):
            # python 2
            # Hei zipfile in odfpy would do a seek
            # but stream from urlib cannot do seek
            file_stream = BytesIO(file_stream.read())
        try:
            file_stream.seek(0)
        except UnsupportedOperation:
            # python 3
            file_stream = BytesIO(file_stream.read())
        BookReader.open_stream(self, file_stream, **keywords)
        self._load_from_memory()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号