How do I compare files?

norseman norseman at
Wed Jul 23 02:30:08 CEST 2008

Timothy Grant wrote:
> On Tue, Jul 22, 2008 at 4:27 PM, Clay Hobbs <clay at> wrote:
>> I am making a program that (with urllib) that downloads two jpeg files
>> and, if they are different, displays the new one.  I need to find a way
>> to compare two files in Python.  How is this done?
>> -- Ratfink
>> --
> I'd start with file sizes.
> If that's not enough you might look at the md5 library and check the md5
> values for the files.
> ------------------------------------------------------------------------
> --
If you are on a Unix platform:
man cmp
man identify
man display  (ImageMagick)
If you use mc (MidnightCommander) the F3 key can help.
Jef Poskanzer's package has tools too.

If you are on a Microsoft platform:
you needs lots money. :)
CorelDraw is available for under $100.00 American

norseman at

More information about the Python-list mailing list