Newbie question on 'cmpfiles':
Oldayz
sill at localhost.kitenet.net
Tue Dec 5 17:54:33 EST 2000
On Tue, 05 Dec 2000 05:59:02 GMT, harisri at my-deja.com <harisri at my-deja.com> wrote:
>Hello,
>
>I am a newbie user to python 2.0
>
>Can someone help me by explaining 'cmpfiles' function with a simple
>example?
>
>I am trying to compare 2 directories, but not sure about the syntaxof
>this function. The "Python Reference Library" did not help me on this.
>
>[What does "common" mean in "cmpfiles(dir1, dir2, common)"?]
This function is used to compare *files*, not directories. Multiple files
in these directories.
To compare directories, use dircmp class:
dircmp (a, b[, ignore[, hide]])
Construct a new directory comparison object, to compare the
directories a and b. ignore is a list of names to ignore, and
defaults to ['RCS', 'CVS', 'tags']. hide is a list of names to
hid, and defaults to [os.curdir, os.pardir].
report ()
Print (to sys.stdout) a comparison between a and b.
etc.. It's in 2.0 lib ref under filecmp
>
>Thanks in advance,
>Hari.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
--
Andrei
More information about the Python-list
mailing list