Re: How do I compare files?

2008-07-23 Thread Gerhard Häring
Clay Hobbs 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? There's a module in the standard library called filecmp ;-) -- Gerhard --

Re: How do I compare files?

2008-07-23 Thread Clay Hobbs
On Tue, 2008-07-22 at 17:29 -0700, Matimus wrote: On Jul 22, 4:27pm, Clay Hobbs [EMAIL PROTECTED] 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

How do I compare files?

2008-07-22 Thread Clay Hobbs
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

Re: How do I compare files?

2008-07-22 Thread Timothy Grant
On Tue, Jul 22, 2008 at 4:27 PM, Clay Hobbs [EMAIL PROTECTED] 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 --

Re: How do I compare files?

2008-07-22 Thread GHZ
On Jul 23, 1:27 am, Clay Hobbs [EMAIL PROTECTED] 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 import hashlib file =

Re: How do I compare files?

2008-07-22 Thread norseman
Timothy Grant wrote: On Tue, Jul 22, 2008 at 4:27 PM, Clay Hobbs [EMAIL PROTECTED] 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? --

Re: How do I compare files?

2008-07-22 Thread Matimus
On Jul 22, 4:27 pm, Clay Hobbs [EMAIL PROTECTED] 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 Do you just want to check to

Re: How do I compare files?

2008-07-22 Thread Larry Bates
Clay Hobbs 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 Use md5 to calculate checksum: import md5 md5file1 =