From 21559e9f4bd58b1504cc0fda7b0dceee0c833862 Mon Sep 17 00:00:00 2001 From: zyp Date: Thu, 26 Jan 2006 19:07:15 +0000 Subject: [project @ zyp-20060126190715-557e941315671b81] [project @ 18] Moved disccat and pyanidb to the right location. Added pyqtmpc and ophidia. --- ed2k/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ed2k/__init__.py (limited to 'ed2k/__init__.py') diff --git a/ed2k/__init__.py b/ed2k/__init__.py new file mode 100644 index 0000000..754b5c9 --- /dev/null +++ b/ed2k/__init__.py @@ -0,0 +1,11 @@ +from _ed2k import * + +def file_hash(name): + e = Ed2k() + f = open(name) + data = f.read(32768) + while data: + e.update(data) + data = f.read(32768) + f.close() + return e.digest() -- cgit v1.2.3