The dircmp module

(Obsolete, only in 1.5.2). This module provides a class that can be used to compare the contents of two disk directories.

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

import dircmp

d = dircmp.dircmp()
d.new("samples", "oldsamples")
d.run()
d.report()

$ python dircmp-example-1.py
diff samples oldsamples
Only in samples : ['sample.aiff', 'sample.au', 'sample.wav']
Identical files : ['sample.gif', 'sample.gz', 'sample.jpg', ...]

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-08-28 02:09:08.005269. hosted by webfaction.