【发布时间】:2016-06-27 23:37:46
【问题描述】:
我创建了一个名为 shoppy 的 zip 文件并将“cats.txt”放入其中,现在我想提取它,但我的代码不起作用,它给了我这个错误
AttributeError: '_io.TextIOWrapper' object has no attribute 'extract'
这是我的代码
from zipfile import *
z=open("shoppy.zip","U")
z.extract("cats.txt")
【问题讨论】: