I'm looking for a way to use python to extract multi-part zip files (eg blah.zip, blah.z01, blah.z02, blah.z03 etc) on Windows without any prerequisite installs (like 7zip). This question has been asked already but the only answer there says to use a local 7zip install which I'd rather avoid, and I don't have enough reputation to add a comment to that thread.
I'm developing a standalone Windows desktop application using python for main functionality, and an important part of one of its main features is being able to extract zip files given to it. Currently I'm doing this with a portable 7zip (7za) distributed with the tool but due to a new situation I need to also support multi part zip files, and I can't seem to do this.
My current code is simply
subprocess.call('7za x -o"'+destinationPath+'" "'+zipPath+'"')
which works for normal zips, but for multi part zips nothing happens and by running it manually through cmd I get the output
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Processing archive: zipname.zip
Error: Can not open file as archive
Even though desktop 7zip is perfectly capable of doing this with the exact same archive. Am I missing something with the syntax of the 7za commands? If not, are there any alternatives besides asking users to ensure they have desktop 7zip installed and try to detect the location of it through the registry etc?
I also tried using python's Zipfile library but that gets me an
error: "BadZipFile: Bad magic number for file header"
as noted by the other thread.
Many thanks in advance!