On approximately 2/2/2010 7:05 PM, came the following characters from the keyboard of Guido van Rossum:
On Tue, Feb 2, 2010 at 5:41 PM, Glenn Linderman<v+pyt...@g.nevcal.com>  wrote:
On approximately 2/2/2010 4:28 PM, came the following characters from the
keyboard of Guido van Rossum:
Argh. zipfiles are way to complex to be writing.
Agreed.  But in reading that, it somehow triggered a question: does
zipimport only work for zipfiles, or does it work for any archive format
that Python stdlib knows how to decode?  And if only the former, why are
they so special?
The former.

They are special because (unlike e.g. tar files) you can read the
table of contents of a zipfile without parsing the entire file.

They are not unique in this... most archive formats except tar have a directory. But that is likely a good reason not to support tar for this purpose, especially since tar usually comes found as .tar.Z or .tar.gz or .tar.bz2 etc. and would require two passes before the data could be found at all.

Also
because they are universally supported which makes it unnecessary to
support other formats. Again, contrast tar files which are virtually
unheard of on Windows.

This may well be true, at least for some definitions of Universal. However, for the definition of Universal that matters to the discussion, is all the platforms on which Python is supported... and certainly all those platforms have support for all the archive formats in Python's stdlib, eh? Oh! Sorry, I had jumped to the conclusion that the stdlib (because of the batteries included philosophy) supported things like 7z and rar files, since they've been around for years, but I see there is a limited selection there. OK, I found the ticket that suggests adding 7z and nosied myself. Didn't bother to look for rar, because I'm a 7z fan, and it has better compression factors in most cases.

--
Glenn
------------------------------------------------------------------------
“Everyone is entitled to their own opinion, but not their own facts. In turn, everyone is entitled to their own opinions of the facts, but not their own facts based on their opinions.” -- Guy Rocha, retiring NV state archivist

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to