<di************@gmail.comwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
On Aug 9, 4:04 pm, brad <byte8b...@gmail.comwrote:
>kyoso...@gmail.com wrote:
You should be able to read chunks of each file in binary mode and do a
compare to check for equality. Some kind of loop should do the trick.
Why not a simple md5 or sha with the hash library?
Or even:
http://docs.python.org/lib/module-filecmp.html
My understanding of reading that is that it only looks at the file names
themselves and not their contents. So whether filename1=filename2 and in the
case of the function below it, whether one directory has files which are in
the other.
Correct me if I'm wrong.
Dom
P.S. md5 or sha hash is what I'd go for, short of doing:
MyFirstFile=file("file1.xls")
MySecondFile=file("file2.xls")
If MyFirstFile==MySecondFile:
print "True"
although this won't tell you where they're different, just that they are...