| 1 | n/a | #---------------------------------------------------------------------- |
|---|
| 2 | n/a | # Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA |
|---|
| 3 | n/a | # and Andrew Kuchling. All rights reserved. |
|---|
| 4 | n/a | # |
|---|
| 5 | n/a | # Redistribution and use in source and binary forms, with or without |
|---|
| 6 | n/a | # modification, are permitted provided that the following conditions are |
|---|
| 7 | n/a | # met: |
|---|
| 8 | n/a | # |
|---|
| 9 | n/a | # o Redistributions of source code must retain the above copyright |
|---|
| 10 | n/a | # notice, this list of conditions, and the disclaimer that follows. |
|---|
| 11 | n/a | # |
|---|
| 12 | n/a | # o Redistributions in binary form must reproduce the above copyright |
|---|
| 13 | n/a | # notice, this list of conditions, and the following disclaimer in |
|---|
| 14 | n/a | # the documentation and/or other materials provided with the |
|---|
| 15 | n/a | # distribution. |
|---|
| 16 | n/a | # |
|---|
| 17 | n/a | # o Neither the name of Digital Creations nor the names of its |
|---|
| 18 | n/a | # contributors may be used to endorse or promote products derived |
|---|
| 19 | n/a | # from this software without specific prior written permission. |
|---|
| 20 | n/a | # |
|---|
| 21 | n/a | # THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS |
|---|
| 22 | n/a | # IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
|---|
| 23 | n/a | # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
|---|
| 24 | n/a | # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL |
|---|
| 25 | n/a | # CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
|---|
| 26 | n/a | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
|---|
| 27 | n/a | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
|---|
| 28 | n/a | # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|---|
| 29 | n/a | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
|---|
| 30 | n/a | # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE |
|---|
| 31 | n/a | # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
|---|
| 32 | n/a | # DAMAGE. |
|---|
| 33 | n/a | #---------------------------------------------------------------------- |
|---|
| 34 | n/a | |
|---|
| 35 | n/a | |
|---|
| 36 | n/a | # This module is just a placeholder for possible future expansion, in |
|---|
| 37 | n/a | # case we ever want to augment the stuff in _db in any way. For now |
|---|
| 38 | n/a | # it just simply imports everything from _db. |
|---|
| 39 | n/a | |
|---|
| 40 | 1 | import sys |
|---|
| 41 | 1 | absolute_import = (sys.version_info[0] >= 3) |
|---|
| 42 | n/a | |
|---|
| 43 | 1 | if not absolute_import : |
|---|
| 44 | 1 | if __name__.startswith('bsddb3.') : |
|---|
| 45 | n/a | # import _pybsddb binary as it should be the more recent version from |
|---|
| 46 | n/a | # a standalone pybsddb addon package than the version included with |
|---|
| 47 | n/a | # python as bsddb._bsddb. |
|---|
| 48 | 0 | from _pybsddb import * |
|---|
| 49 | 0 | from _pybsddb import __version__ |
|---|
| 50 | n/a | else: |
|---|
| 51 | 1 | from _bsddb import * |
|---|
| 52 | 1 | from _bsddb import __version__ |
|---|
| 53 | n/a | else : |
|---|
| 54 | n/a | # Because this syntaxis is not valid before Python 2.5 |
|---|
| 55 | 0 | if __name__.startswith('bsddb3.') : |
|---|
| 56 | 0 | exec("from ._pybsddb import *") |
|---|
| 57 | 0 | exec("from ._pybsddb import __version__") |
|---|
| 58 | n/a | else : |
|---|
| 59 | 0 | exec("from ._bsddb import *") |
|---|
| 60 | 0 | exec("from ._bsddb import __version__") |
|---|