
[James C. Ahlstrom]
... 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.
Unfortunately, there are many different CRC functions in common use. None belong in md5; if the intent is to support just zip's version, adding a (say) zipcrc32 function to binascii would be ok; if we expect to support others as well, a new parameterized crc module would be in order.
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?
No, it's a clumsiness unique to WinZip (damn GUIs <0.9 wink>). In the Add dialog box, you need to cd to the *Lib* directory, check the "Save extra folder info" box, and then, e.g., 1. Put test\*.pyc in the Add Files line, and click Add With Wildcards. Then all test\*.pyc files will be added, with paths test/__init__.pyc etc. or 2. Put "test\__init__.pyc" "test\testall.pyc" (including the quotes!) in the Add Files line, and click Add. Since #2 can be unbearable, other useful strategies include: 3. Use #1 (e.g. with dir\*.*) then delete the files you didn't really want. 4. Use #1 repeatedly, cleverly using a number of wildcard patterns that cover the files of interest. 5. Mixtures of #3 and #4. 6. Use a comand-line zip tool instead (e.g., pkzip; I think WinZip has an "experimental" cmdline add-on too, but haven't tried it).