Using gzip means you can compress only 1 file per gzip; so you'll have
to invent something like tar to put all your files in your directories
together into 1 file and then apply gzip on that file to get it
compressed...
Using the zipfile module should allow you to create a standard
winzip-compatib
Isn't it much easier to figure out how python built-in module 'zipfile'
works?
Pseudo-code would be something like:
#UNTESTED
import zipfile
import os
import os.path
zf = zipfile.ZipFile('myzipfilename.zip', 'w', zipfile.ZIP_DEFLATED)
for root, dirs, files in os.walk('compressthisdir'):
for
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299412
--
http://mail.python.org/mailman/listinfo/python-list
sri2097 wrote:
> Hi all,This is in reply to the 'Compressing folders in Windows using
> Python' query I raised y'day.
>
> I figured out that windows does not allow command line zipping so I
> started looking for alternatives.
>
> I found some modules in Perl which does zipping. I guess it goes by