From 3a5b32f44a95b989e39273527fc924ad3d32465e Mon Sep 17 00:00:00 2001 From: zyp Date: Mon, 8 May 2006 12:54:40 +0000 Subject: [project @ zyp-20060508125440-a3cc6ea65de180a0] [project @ 23] Seperated from disccat to a standalone project. --- __init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 __init__.py (limited to '__init__.py') diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..0333819 --- /dev/null +++ b/__init__.py @@ -0,0 +1,11 @@ +from _hash import * + +def file_hash(name): + h = Hash() + f = open(name) + data = f.read(32768) + while data: + h.update(data) + data = f.read(32768) + f.close() + return h \ No newline at end of file -- cgit v1.2.3