How do I compare files?
geraint.williams at gmail.com
Wed Jul 23 02:02:03 CEST 2008
On Jul 23, 1:27 am, Clay Hobbs <c... 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
file = open(path)
m = hashlib.md5()
digest = m.hexdigest()
and compare the digest on both files
More information about the Python-list