def check_sum(file): import scipy.weave.md5_load as md5 try: f = open(file, 'r') bytes = f.read(-1) except IOError: bytes = '' chk_sum = md5.md5(bytes) return chk_sum.hexdigest()
def check_sum(file): import scipy.weave.md5_load as md5 try: f = open(file,'r') bytes = f.read(-1) except IOError: bytes = '' chk_sum = md5.md5(bytes) return chk_sum.hexdigest()
def identifier(self,signature): # Build an MD5 checksum f = self.function co = f.func_code identifier = str(signature)+\ str(co.co_argcount)+\ str(co.co_consts)+\ str(co.co_varnames)+\ co.co_code return 'F'+md5.md5(identifier).hexdigest()
def identifier(self, signature): # Build an MD5 checksum f = self.function co = f.func_code identifier = str(signature)+\ str(co.co_argcount)+\ str(co.co_consts)+\ str(co.co_varnames)+\ co.co_code return 'F' + md5.md5(identifier).hexdigest()