with ZipFile(zip_file_name, 'r') as zipObj:
# Get a list of all archived file names from the zip
listOfFileNames = zipObj.namelist()
# Iterate over the file names
for fileName in listOfFileNames:
#check the excluding file condition.
if fileName is 'FILE_TO_BE_EXCLUDED.txt':
continue
zipObj.extract(fileName, 'path_for_extracting')
要做到这一点,我认为你需要有这些步骤。你知道吗
我的参考号是here. 希望这能对你有所帮助。你知道吗
相关问题 更多 >
编程相关推荐