If I am unzipping a Zip file with the Python ZipFile library, where the file was created on Windows, but my code is running on Unix-like, will the path separators always be Unix-style?
Python's zipfile is a standard library module intended to manipulate ZIP files. This file format is a widely adopted industry standard when it comes to archiving and compressing digital data.
Internally, ZipFile stores forward slashes as required by the zip file specification.
Externally, they get translated using os.sep so it will match what is normally expected on a given platform.
Code references:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With