2008-07-15: Selected articles (including this one) now have experimental "comment" links in the left column and at the bottom. You're welcome to use them for commenting and voting on articles. For a bit more on this, see this page. /F

The cmpcache module

(Obsolete, only in 1.5.2). This module contains a function to compare two files. It’s an extension of the cmp module, in that it keeps a cache over recently made comparisons.

Example: Using the cmpcache module
# File: cmpcache-example-1.py

import cmpcache

if cmpcache.cmp("samples/sample.au", "samples/sample.wav"):
    print "files are identical"
else:
    print "files differ!"
files differ!

In Python 2.0 and later, this module has been replaced by the filecmp module.

 
[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.02s 2008-07-25 10:14:11.489343. hosted by webfaction.