comicarchive.py 文件源码

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

项目:Comictagger 作者: dickloraine 项目源码 文件源码
def readArchiveFile( self, archive_file ):
        data = ""
        zf = zipfile.ZipFile( self.path, 'r' )

        try:
            data = zf.read( archive_file )
        except zipfile.BadZipfile as e:
            print >> sys.stderr, u"bad zipfile [{0}]: {1} :: {2}".format(e, self.path, archive_file)
            zf.close()  
            raise IOError
        except Exception as e:
            zf.close()  
            print >> sys.stderr, u"bad zipfile [{0}]: {1} :: {2}".format(e, self.path, archive_file)
            raise IOError
        finally:
            zf.close()
        return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号