deleting from tarfile
"Martin v. Löwis"
martin at v.loewis.de
Sun Jan 16 04:41:40 EST 2005
Mark McEahern wrote:
> It doesn't appear so. A workaround, of course, is to create a new file
> with the subset of files from the old file:
That is actually the *only* way to do that. tarfiles cannot be "sparse",
in the sense that parts of the file can be marked as deleted. So in
order to delete a file, you have to copy the entire tarfile, and skip
the file you want to delete - whether you do this yourself, or whether
tarfile.py does it for you.
More information about the Python-list