Jean-Claude Wippler wrote:
Ouch - what's wrong with zip archives?
With all due respect - I sincerely hope you will reconsider and alter your code to work with zip files. It's probably a small adjustment?
OK, I now have a new module "zipfile" which reads and
writes ZIP files. It is written in Python and has been tested
on Windows and Linux. I tested it with WinZip and found that
the files it creates are read OK with WinZip, and WinZip
files are read OK with zipfile. So I am withdrawing my
Python archive file format, and re-writing all my stuff
using zipfile. It should all be done in a week.
Basically everything works fine. But there are some problems.
Python seems to lack a CRC-32 function, so I wrote one
in Python. It is slow. We need to add a CRC-32 function
to some Python built-in module that it always present, like
md5 or binascci. The zlib module is not necessarily present.
I can't seem to get WinZip to record a partial path. That is,
I want the ./Lib/test package to have these ZIP paths:
test/__init__.pyc
test/testall.pyc
...
but WinZip creates files with either no path at all or the
fully specified path. Am I missing something? Do all
other ZIP tools do this too?
JimA
Return-Path:
OK, I now have a new module "zipfile" which reads and writes ZIP files. It is written in Python and has been tested on Windows and Linux. I tested it with WinZip and found that the files it creates are read OK with WinZip, and WinZip files are read OK with zipfile. So I am withdrawing my Python archive file format, and re-writing all my stuff using zipfile. It should all be done in a week.
Ah, good! (This saves me the trouble of cleaning up our own zip code :-)
Basically everything works fine. But there are some problems.
Python seems to lack a CRC-32 function, so I wrote one in Python. It is slow. We need to add a CRC-32 function to some Python built-in module that it always present, like md5 or binascci. The zlib module is not necessarily present.
I can't seem to get WinZip to record a partial path. That is, I want the ./Lib/test package to have these ZIP paths: test/__init__.pyc test/testall.pyc ... but WinZip creates files with either no path at all or the fully specified path. Am I missing something? Do all other ZIP tools do this too?
Unclick the "Save Extra Folder Info" and then drag the *parent* folder into the archive. --Guido van Rossum (home page: http://www.python.org/~guido/)