ยปCore Development>Code coverage>Lib/bsddb/db.py

Python code coverage for Lib/bsddb/db.py

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