diff options
author | zyp <zyp@localhost> | 2006-05-08 15:23:20 +0200 |
---|---|---|
committer | zyp <zyp@localhost> | 2006-05-08 15:23:20 +0200 |
commit | df9c15d40a50ed17baa7bdbb11ef6cca9d410cf3 (patch) | |
tree | 4ceb64d5c29e6bf487f8a6e7dde655a2c0b5f26a /multihash | |
parent | 3a5b32f44a95b989e39273527fc924ad3d32465e (diff) |
[project @ zyp-20060508132320-2c118d1a7e2505db]
[project @ 24]
Converted from make to distutils.
Diffstat (limited to 'multihash')
-rw-r--r-- | multihash/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/multihash/__init__.py b/multihash/__init__.py new file mode 100644 index 0000000..5bcf4d5 --- /dev/null +++ b/multihash/__init__.py @@ -0,0 +1,11 @@ +from _multihash import * + +def file_hash(name): + h = Multihash() + 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 |