How do I compare files?

Timothy Grant timothy.grant at gmail.com
Wed Jul 23 01:49:18 CEST 2008


On Tue, Jul 22, 2008 at 4:27 PM, Clay Hobbs <clay at lakeserv.net> 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
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

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.

-- 
Stand Fast,
tjg. [Timothy Grant]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080722/bddc8133/attachment.html>


More information about the Python-list mailing list