On Mar 19, 11:55 am, Shane Geiger <[EMAIL PROTECTED]> wrote:
> In the unix world, 'fc' would be like diff.
>
> """
> Python example of checksumming files with the MD5 module.
>
> In Python 2.5, the hashlib module would be preferable/more elegant.
> """
>
> import md5
>
> import string, os
> r = lam
In the unix world, 'fc' would be like diff.
"""
Python example of checksumming files with the MD5 module.
In Python 2.5, the hashlib module would be preferable/more elegant.
"""
import md5
import string, os
r = lambda f: open(f, "r").read()
def readfile(f,strip=False): return (strip and stripp
In <[EMAIL PROTECTED]>, Beliavsky
wrote:
> […] How should one check that files are the same in Python? The files
> are plain text.
Take a look at the `filecmp` module. Pay attention to the shallow
argument of `filecmp.cmp()` and the default value!
Ciao,
Marc 'BlackJack' Rintsch
--
htt