The cmpcache Module

(Obsolete, Only in 1.5.2) The cmpcache module contains a function that compares two files. Its an extension of the cmp module in that it keeps a cache over recently made comparisons. Example 14-20 shows the modules 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.


Core Modules

More Standard Modules

Threads and Processes

Data Representation

File Formats

Mail and News Message Processing

Network Protocols

Internationalization

Multimedia Modules

Data Storage

Tools and Utilities

Platform-Specific Modules

Implementation Support Modules

Other Modules



Python Standard Library
Python Standard Library (Nutshell Handbooks) with
ISBN: 0596000960
EAN: 2147483647
Year: 2000
Pages: 252
Authors: Fredrik Lundh

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net