xml_parse.py 文件源码

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

项目:convenience 作者: Jean13 项目源码 文件源码
def decompress_bz2(filepath):

    download_photo(filepath)

    try:
        # Open the BZ2 file
        zipfile = bz2.BZ2File(filepath)
        # Get the decompressed data
        data = zipfile.read()
        # Assuming the filepath ends with .bz2
        newfilepath = filepath[:-4]
        # Write an uncompressed file
        open(newfilepath, 'wb').write(data)

        return newfilepath

    except IOError as e:
        print "[!] Please verifiy you entered the correct cookie value.\n"
        print e
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号