[Tutor] compress directory

boB Stepp robertvstepp at gmail.com
Thu Nov 3 14:02:56 EDT 2016


On Thu, Nov 3, 2016 at 10:48 AM, Bill Nolf <bnolf at cox.net> wrote:
> How do I compress (gzip and/or tar) a directory in python?  I found examples of compressing a file using gzip or tar but not a directory.
> thanks

I did a search for almost your exact question and got this:

http://stackoverflow.com/questions/1855095/how-to-create-a-zip-archive-of-a-directory

No time to look it over, but perhaps it will help.



-- 
boB


More information about the Tutor mailing list