[Tutor] CRC calculation with python

Dave Kuhlman dkuhlman at rexx.com
Tue Feb 6 18:27:35 CET 2007

On Tue, Feb 06, 2007 at 12:10:36PM -0500, Chris Calloway wrote:
> First, you need to find the preprocessor define for CCITT_POLY. The code 
> is incomplete without it.
> Second, where did this code come from? It defines an unused local named 
> cval, which will usually cause at least a compilation warning.
> This looks like a snippet, not a complete CCITT CRC calculation.

Also, see the crcmod module:


But, the README that comes with crcmod recommends the md5 module in
the Python standard library.


Dave Kuhlman

More information about the Tutor mailing list