I've been looking for the equivalent python method for the unix cksum command:
http://pubs.opengroup.org/onlinepubs/7990989775/xcu/cksum.html
$ cksum ./temp.bin
1605138151 712368 ./temp.bin
So far I have found the zlib.crc32() function
>>> import zlib
>>> f = open('./temp.bin','rb')
>>> data = f.read()
>>> zlib.crc32(data)
1128751837
However this code appears to produce different results. As far as I can tell this should be using the same crc polynomial but I imagine there must be some difference in byte order or initial values. Can anyone shed some light on this for me?