'Python zipfile large file hangs forevers
python -m zipfile -c ~/testbig.zip ~/verylarge4gbfile.zip
It hangs forever.
Is there a better python library I can use?
I'm using the command as a POC that the library doesn't seem to work for large files, so I need another python library option, although I suppose I could also use a system command and call it through python, but I'd prefer to handle progress of zipping the file[s].
EDIT: I ran it again, and after 30 minutes it finished. I suppose I just need a way to monitor progress, or chunk the zipping process.
Solution 1:[1]
Just use GZip. It's iteratable, so you can for loop through the data to watch for progress.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sophie McCarrell |