tarfile woes

Hans-Joachim Widmaier hjwidmaier at web.de
Fri Aug 22 22:32:07 CEST 2003


Am Fri, 22 Aug 2003 11:40:13 +0200 schrieb Lars Gustaebel:

>>  - bzip2 compressed files cannot be read from a "fake" (StringIO) file
>>    object, only from real files.
> 
> Much to my regret, this is a limitation of the bz2 module which is used.

Ooh, haven't noticed that myself. That's really sad.
 
>>  - It does not handle compressed (.Z) archives.
> 
> This is sad, too, but IMO tolerable for most people.

Yes, certainly. Those shouldn't be existent anymore, anyhow. It's just
that I made a test run of my class on a directory full of source archives
and got an exception there.

> As you observed by yourself ZipInfo's naming scheme is inconsistent and I
> didn't find it a good idea to adopt this mindlessly. Also, I found an
> integer value for mtime much more versatile than a tuple.

I guess its stored in the zipfile that way, but this is one of the
internals I'm really not interested in, as an integer value loses
absolutely nothing. Or, even better, have all dates and times uniformly
represented by the new DateTime class.

> Your criticism is justified. And I'm sure that in the future a
> standardized and extensible interface to archive manipulation could emerge
> *if* people just want it badly enough (and someone does all the work :-).

I'm afraid the ones who want it ought to be the ones who do the work.
Who else would have any interest in doing it? This is maybe the downside
of free software - nobody gets paid writing the pieces nobody wants to.

> Let's wait and see.

I'd rather *do* something. If anything, I would really love to write new
modules/classes instead of ranting. But, as I already tried to explain,
I'm simply not good enough for the job. Which leaves me, of course, with
just one option: take what you get and be grateful.

Despite my current problems with tarfile (btw, there are other
modules/classes that insist on a _filename_ [gdk.pixbuf, i.e.]), it
enabled me to write a little backup tool just when I needed it in almost
no time. So I have reason to be grateful. :-)

Waiting-and-seeing'ly yours
hjw




More information about the Python-list mailing list