1 \section{\module{cmp
} ---
4 \declaremodule{standard
}{cmp
}
5 \sectionauthor{Moshe Zadka
}{moshez@zadka.site.co.il
}
6 \modulesynopsis{Compare files very efficiently.
}
8 \deprecated{1.6}{Use the
\refmodule{filecmp
} module instead.
}
10 The
\module{cmp
} module defines a function to compare files, taking all
11 sort of short-cuts to make it a highly efficient operation.
13 The
\module{cmp
} module defines the following function:
15 \begin{funcdesc
}{cmp
}{f1, f2
}
16 Compare two files given as names. The following tricks are used to
17 optimize the comparisons:
20 \item Files with identical type, size and mtime are assumed equal.
21 \item Files with different type or size are never equal.
22 \item The module only compares files it already compared if their
23 signature (type, size and mtime) changed.
24 \item No external programs are called.
32 >>> cmp.cmp('libundoc.tex', 'libundoc.tex')
34 >>> cmp.cmp('libundoc.tex', 'lib.tex')