Re: simple python script to zip files

2008-02-16 Thread John Machin
On Feb 17, 6:52 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > Thanks! Works indeed. Strange thing is though, the files created are the > > exact size as the original file. So it seems like it is zipping without > > compression. > > The instantiation of the ZipFile object can take an optional > param

Re: simple python script to zip files

2008-02-16 Thread T_T
> f = zipfile.ZipFile(zipfilename, 'w', > compression=zipfile.ZIP_DEFLATED) > > -tkc Adding the compression rule works great, thanks again! -- http://mail.python.org/mailman/listinfo/python-list

Re: simple python script to zip files

2008-02-16 Thread Tim Chase
> Thanks! Works indeed. Strange thing is though, the files created are the > exact size as the original file. So it seems like it is zipping without > compression. The instantiation of the ZipFile object can take an optional parameter to control the compression. The zipfile module only suppor

Re: simple python script to zip files

2008-02-16 Thread T_T
> > seems to do the trick for me. > > -tkc Thanks! Works indeed. Strange thing is though, the files created are the exact size as the original file. So it seems like it is zipping without compression. -- http://mail.python.org/mailman/listinfo/python-list

Re: simple python script to zip files

2008-02-16 Thread Tim Chase
>> I'm just starting to learn some Python basics and are not familiar with >> file handling. >> Looking for a python scrip that zips files. So aaa.xx bbb.yy ccc.xx >> should be zipped to aaa.zip bbb.zip ccc.zip >> >> I haven't been able to type more than 'import gzip'.. Well, you ask for zip fil

Re: simple python script to zip files

2008-02-16 Thread T_T
On Sat, 16 Feb 2008 15:37:16 +, T_T wrote: > Hi, > > I'm just starting to learn some Python basics and are not familiar with > file handling. > Looking for a python scrip that zips files. So aaa.xx bbb.yy ccc.xx > should be zipped to aaa.zip bbb.zip ccc.zip > > I haven't been able to type m

simple python script to zip files

2008-02-16 Thread T_T
Hi, I'm just starting to learn some Python basics and are not familiar with file handling. Looking for a python scrip that zips files. So aaa.xx bbb.yy ccc.xx should be zipped to aaa.zip bbb.zip ccc.zip I haven't been able to type more than 'import gzip'.. Just a script I need for practica