Question regarding checksuming of a file

Ant antroy at gmail.com
Sun May 14 03:57:00 EDT 2006


A script I use for comparing files by MD5 sum uses the following
function, which you may find helps:

def getSum(self):
        md5Sum = md5.new()

        f = open(self.filename, 'rb')

        for line in f:
            md5Sum.update(line)
        
        f.close()
        
        return md5Sum.hexdigest()




More information about the Python-list mailing list