Mercurial > p > roundup > code
comparison roundup/anypy/hashlib_.py @ 4089:eddb82d0964c
Add compatibility package to allow us to deal with Python versions 2.3..2.6.
Outstanding issues noted in roundup/anypy/TODO.txt
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 12 Mar 2009 02:52:56 +0000 |
| parents | |
| children | 357c6079c73b |
comparison
equal
deleted
inserted
replaced
| 4088:34434785f308 | 4089:eddb82d0964c |
|---|---|
| 1 """ | |
| 2 anypy.hashlib_: encapsulation of hashlib/md5/sha1/sha | |
| 3 """ | |
| 4 | |
| 5 try: | |
| 6 from hashlib import md5, sha1 # new in Python 2.5 | |
| 7 except ImportError: | |
| 8 from md5 import md5 # deprecated in Python 2.6 | |
| 9 from sha import sha as sha1 # deprecated in Python 2.6 | |
| 10 | |
| 11 # vim: ts=8 sts=4 sw=4 si |
