16aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis#---------------------------------------------------------------------- 26aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA 36aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# and Andrew Kuchling. All rights reserved. 46aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# 56aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# Redistribution and use in source and binary forms, with or without 66aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# modification, are permitted provided that the following conditions are 76aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# met: 86aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# 96aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# o Redistributions of source code must retain the above copyright 106aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# notice, this list of conditions, and the disclaimer that follows. 116aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# 126aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# o Redistributions in binary form must reproduce the above copyright 136aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# notice, this list of conditions, and the following disclaimer in 146aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# the documentation and/or other materials provided with the 156aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# distribution. 166aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# 176aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# o Neither the name of Digital Creations nor the names of its 186aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# contributors may be used to endorse or promote products derived 196aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# from this software without specific prior written permission. 206aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# 216aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS 226aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 236aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 246aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL 256aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 266aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 276aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 286aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 296aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 306aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 316aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 326aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# DAMAGE. 336aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis#---------------------------------------------------------------------- 346aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis 356aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis 366aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# This module is just a placeholder for possible future expansion, in 376aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# case we ever want to augment the stuff in _db in any way. For now 386aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis# it just simply imports everything from _db. 396aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis 40c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Ceaimport sys 41c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Ceaabsolute_import = (sys.version_info[0] >= 3) 426aa4a1f29ca575e25fc595857b2a5168a02c9780Martin v. Löwis 43c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Ceaif not absolute_import : 44c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea if __name__.startswith('bsddb3.') : 45c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea # import _pybsddb binary as it should be the more recent version from 46c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea # a standalone pybsddb addon package than the version included with 47c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea # python as bsddb._bsddb. 48c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea from _pybsddb import * 49c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea from _pybsddb import __version__ 50c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea else: 51c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea from _bsddb import * 52c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea from _bsddb import __version__ 53c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Ceaelse : 54c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea # Because this syntaxis is not valid before Python 2.5 55c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea if __name__.startswith('bsddb3.') : 56c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea exec("from ._pybsddb import *") 57c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea exec("from ._pybsddb import __version__") 58c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea else : 59c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea exec("from ._bsddb import *") 60c5a11fabdb03d032f278f86e600bcdaafdb5d783Jesus Cea exec("from ._bsddb import __version__") 61