I wrote: > this prints > > 0xF032519BL 0xF032519BL > 0x90E3070AL 0x90E3070AL > > no time to sort out the int/long mess for binascii.crc32, but it pro- > bably needs the same tweaking as PIL (which handles the CRC as > two 16-bit numbers, to avoid sign hell).
I realized that I used 2.3 for testing. under 2.4, the following snippet runs without warnings: import binascii def test2(text, crc=0): return hex((binascii.crc32(text, crc^-1)^-1)&0xffffffff) in other words, crc = binascii.crc32(text, crc^-1)^-1)&0xffffffff should give the same result as larry's original CalculateCrc function. </F> -- http://mail.python.org/mailman/listinfo/python-list