当 zip 文件存在于脚本文件所在的不同目录中时,如何使用 python 提取 zip 文件。我尝试这个,但我收到错误,因为源路径不被接受,尝试解决我这个问题。
from zipfile import ZipFile
def func(source, target):
with ZipFile('source', 'target'):
ZipFile.Extractall('target')
Run Code Online (Sandbox Code Playgroud)