A little more compact and optimized code
def crc(fileName):
prev = 0
for eachLine in open(fileName,"rb"):
prev = zlib.crc32(eachLine, prev)
return "%X"%(prev & 0xFFFFFFFF)
PS2: Old PS is deprecated – therefore deleted -, because of the suggestion in the comment. Thank you. I don’t get, how I missed this, but it was really good.