The cmpcache Module

(Obsolete, Only in 1.5.2) The cmpcache module contains a function that compares two files. It’s an extension of the cmp module in that it keeps a cache over recently made comparisons. Example 14-20 shows the module’s use.

Example 14-20. 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.51.153