simple python script to zip files

T_T t at nomail.com
Sat Feb 16 10:40:55 EST 2008


On Sat, 16 Feb 2008 15:37:16 +0000, 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 more than 'import gzip'..
> 
> Just a script I need for practical use (zip didn't do the job) and not
> for educational purposes.

btw. I need it for batch handling, so I want to place the file in a 
directory, run it and zip all files in the directory. 

Hope someone will be able to help me.



More information about the Python-list mailing list