binary file compare...

Grant Edwards invalid at invalid
Mon Apr 13 16:03:32 EDT 2009


On 2009-04-13, SpreadTooThin <bjobrien62 at gmail.com> wrote:

> I want to compare two binary files and see if they are the same.
> I see the filecmp.cmp function but I don't get a warm fuzzy feeling
> that it is doing a byte by byte comparison of two files to see if they
> are they same.

Perhaps I'm being dim, but how else are you going to decide if
two files are the same unless you compare the bytes in the
files?

You could hash them and compare the hashes, but that's a lot
more work than just comparing the two byte streams.

> What should I be using if not filecmp.cmp?

I don't understand what you've got against comparing the files
when you stated that what you wanted to do was compare the files.

-- 
Grant Edwards                   grante             Yow! Look DEEP into the
                                  at               OPENINGS!!  Do you see any
                               visi.com            ELVES or EDSELS ... or a
                                                   HIGHBALL?? ...



More information about the Python-list mailing list