Try reading the file in chunks instead: CHUNKSIZE = 2**20 hash = hashlib.md5() while True: chunk = f.read(CHUNKSIZE) if not chunk: break hash.update(chunk) hashvalue = hash.hexdigest()
Thank you peter for the above valubale reply. but shouldn't read() by itself work because i have enough memory to load it or should it be a bug. thank you george --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor