diff options
author | zyp <zyp@localhost> | 2006-01-26 20:07:15 +0100 |
---|---|---|
committer | zyp <zyp@localhost> | 2006-01-26 20:07:15 +0100 |
commit | 21559e9f4bd58b1504cc0fda7b0dceee0c833862 (patch) | |
tree | 119240a883b5bda7e4c11f60dc39206e87b1e04f /ed2k/__init__.py |
[project @ zyp-20060126190715-557e941315671b81]
[project @ 18]
Moved disccat and pyanidb to the right location.
Added pyqtmpc and ophidia.
Diffstat (limited to 'ed2k/__init__.py')
-rw-r--r-- | ed2k/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
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() |