doing "checksum" in python

Sean Blakey pythonista at
Tue Mar 29 01:27:12 CEST 2005

On 28 Mar 2005 15:11:32 -0800, GujuBoy <dirgesh at> wrote:
> is there a built-in function that does a "checksum" on a file...basicly
> counts the bytes and computes a 16-bit checksum for each given FILE.
> this is the like the "sum" command in unix
> --

Not built-in, but you can find a few implementations with a quick
google search for "python 16-bit checksum":

Sean Blakey
Saint of Mild Amusement, Evil Genius, Big Geek
Python/Java/C++/C(Unix/Windows/Palm/Web) developer
quine = ['print "quine =",quine,"; exec(quine[0])"'] ; exec(quine[0])

More information about the Python-list mailing list