pyimod02_archive.py 文件源码

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

项目:driveboardapp 作者: nortd 项目源码 文件源码
def extract(self, name):
        (typ, pos, length) = self.toc.get(name, (0, None, 0))
        if pos is None:
            return None
        with self.lib:
            self.lib.seek(self.start + pos)
            obj = self.lib.read(length)
        try:
            if self.cipher:
                obj = self.cipher.decrypt(obj)
            obj = zlib.decompress(obj)
            if typ in (PYZ_TYPE_MODULE, PYZ_TYPE_PKG):
                obj = marshal.loads(obj)
        except EOFError:
            raise ImportError("PYZ entry '%s' failed to unmarshal" % name)
        return typ, obj
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号