Reading tar/gz-files
Thomas Weholt
thomas at bibsyst.no
Fri Jan 7 03:40:03 EST 2000
Bernhard Herzog wrote:
>
> Martin von Loewis <loewis at informatik.hu-berlin.de> writes:
>
> > Alternatively, you could try to live without an external tar command,
> > and implement that yourself. The gzip module is already there and
> > provides you with an uncompressed stream. All you'd need to do is to
> > interpret the format of tar yourself. See /usr/include/tar.h for a
> > starting point.
>
> Note also, that the Python Imaging Library comes with a TarIO module
> that implements at least some of the functionality.
>
> --
> Bernhard Herzog | Sketch, a drawing program for Unix
> herzog at online.de | http://sketch.sourceforge.net/
Ah,
This is nice. Since I`m not at all into C-programming I tend to rely on
the work of others and mainly on modules, cutting my personal effort and
work down to a minimum. Ok, so I`m lazy. The reading tar.h-stuff: eh ...
I`ll skip that. TarIO implements some of the functionality you say, just
how much is my question. All I want is to get a list of the files in a
tar.gz/tgz-archive.
If anybody felt a need to code som simple example on how to do this ...
well, I`ll be a very happy-still-lazy camper. ;->
Thanks folks.
Best regards
Thomas
More information about the Python-list
mailing list