diff options
Diffstat (limited to 'Lib/bsddb/__init__.py')
-rw-r--r-- | Lib/bsddb/__init__.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index 6b4f965188..4671acc390 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -33,11 +33,18 @@ #---------------------------------------------------------------------- -"""Support for BerkeleyDB 3.1 through 4.1. +"""Support for BerkeleyDB 3.2 through 4.2. """ try: - import _bsddb + if __name__ == 'bsddb3': + # import _pybsddb binary as it should be the more recent version from + # a standalone pybsddb addon package than the version included with + # python as bsddb._bsddb. + import _pybsddb + _bsddb = _pybsddb + else: + import _bsddb except ImportError: # Remove ourselves from sys.modules import sys |