unzip.py 文件源码

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

项目:purelove 作者: hucmosin 项目源码 文件源码
def unzip(f):
    if os.path.isfile(f):
        try:
            with zipfile.ZipFile(f) as zf:
                zf.extractall('.')
                return '[*] File {} extracted.'.format(f)
        except zipfile.BadZipfile:
            return '[!] Error: Failed to unzip file.'
    else:
        return '[-] Error: File not found.'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号