Add a file to a compressed tarfile

Dennis Hotson djdennie69 at hotmail.com
Fri Nov 5 08:52:18 EST 2004


On Fri, 05 Nov 2004 13:40:22 +0000, Martin Franklin wrote:

> On Fri, 05 Nov 2004 13:26:22 -0000, Martin Franklin  
> <mfranklin1 at gatwick.westerngeco.slb.com> wrote:
> 
>> On Sat, 06 Nov 2004 00:13:16 +1100, Dennis Hotson  
>> <djdennie69 at hotmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm trying to write a function that adds a file-like-object to a
>>> compressed tarfile...  eg ".tar.gz" or ".tar.bz2"
>>>
>>> I've had a look at the tarfile module but the append mode doesn't  
>>> support
>>> compressed tarfiles... :(
>>>
>>> Any thoughts on what I can do to get around this?
>>>
>>> Cheers!
>>
> 
> 
> <snip - useless info from myself>
> 
> Sorry I just re-read your message after sending my reply....

Ahh ok... Yeah, I've already seen the docs... thanks anyway! :D

I'm currently trying to read all of the files inside the tarfile... then
writing them all back. Bit of a kludge, but it should work..

Cheers!

Dennis



More information about the Python-list mailing list