Creating tgz file

Gerhard Häring gerhard.haering at gmx.de
Tue Dec 3 13:52:56 EST 2002


Thomas Guettler wrote:
> Hi!
> 
> Is there a way to create a tgz file with python?
> 
> os.system('tar -czf ...') is not portable.

There's a tarfile module that we'll maybe see in 2.3.

http://www.gustaebel.de/lars/tarfile/

For compression, you should be able to use the standard 'gzip' module.

-- Gerhard



More information about the Python-list mailing list