python类read()的实例源码

fwunpack.py 文件源码 项目:binaryanalysis 作者: armijnhemel 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def searchUnpackUbi(filename, tempdir=None, blacklist=[], offsets={}, scanenv={}, debug=False):
    hints = {}
    if not 'ubi' in offsets:
        return ([], blacklist, [], hints)
    if offsets['ubi'] == []:
        return ([], blacklist, [], hints)
    datafile = open(filename, 'rb')
    ## We can use the values of offset and ubisize where offset != -1
    ## to determine the ranges for the blacklist.
    diroffsets = []
    counter = 1
    ## TODO: big file fixes
    data = datafile.read()
    datafile.close()
    for offset in offsets['ubi']:
        blacklistoffset = extractor.inblacklist(offset, blacklist)
        if blacklistoffset != None:
            continue
        tmpdir = dirsetup(tempdir, filename, "ubi", counter)
        res = unpackUbi(data, offset, tmpdir)
        if res != None:
            (ubitmpdir, ubisize) = res
            diroffsets.append((ubitmpdir, offset, ubisize))
            blacklist.append((offset, offset+ubisize))
            ## TODO use ubisize to set the blacklist correctly
            counter = counter + 1
        else:
            ## cleanup
            os.rmdir(tmpdir)
    return (diroffsets, blacklist, [], hints)
install.py 文件源码 项目:Liljimbo-Chatbot 作者: chrisjim316 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:news-for-good 作者: thecodinghub 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:CaScale 作者: Thatsillogical 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:where2live 作者: fbessez 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:pyetje 作者: rorlika 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:respeaker_virtualenv 作者: respeaker 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:Tencent_Cartoon_Download 作者: Fretice 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:Problematica-public 作者: TechMaz 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:bawk 作者: jttwnsnd 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:infinite-lorem-ipsum 作者: patjm1992 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:coolrelation 作者: mrtial 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:fieldsight-kobocat 作者: awemulya 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:chalktalk_docs 作者: loremIpsum1771 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:python-group-proj 作者: Sharcee 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:covar_me_app 作者: CovarMe 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:My-Web-Server-Framework-With-Python2.7 作者: syjsu 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:WebAct 作者: CreatCodeBuild 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:PornGuys 作者: followloda 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
install.py 文件源码 项目:amazon-alexa-twilio-customer-service 作者: ameerbadri 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def parsed_wheel_info(self):
        """Parse wheel metadata (the .data/WHEEL file)"""
        return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))


问题


面经


文章

微信
公众号

扫码关注公众号