parse tar file with python
carel.fellinger at iae.nl
Wed Jun 12 07:26:12 EDT 2002
On Wed, Jun 12, 2002 at 11:29:30AM +0200, Shagshag13 wrote:
> i 'm not sure this is the right place to ask, but maybe somebody had already do some kind of python code on this :
> i had hundred thousand of small files, my program is very slow. I'm thinking that i loose time waiting for opening/closing, and i
Some filesystems get very slow with lots of files in a single directory.
Maybe the simplest solution is to organize those thousands of files in
a few (hundreth) subdirectories. Might give you all the speed-up you need.
> But in this case i don't know how to check for the end of a file and how to get its name (both in a tar archive) ...
> (i don't want to tar/untar with python, just to be able to do a sequential reading of a tar file to get its content)
Parsing the tar file is aka untarring it in memory, so what not use
the tar module?
More information about the Python-list