~inkscape.dev/inkscape-devlibs/trunk

« back to all changes in this revision

Viewing changes to python/Lib/bsddb/db.py

  • Committer: Eduard Braun
  • Date: 2016-10-22 16:54:41 UTC
  • Revision ID: eduard.braun2@gmx.de-20161022165441-gfp6agtut9nh4p22
Update Python to version 2.7.12

Included modules:
  coverage 4.2
  lxml 3.6.4
  numpy 1.11.2
  scour 0.35
  six 1.10.0

Show diffs side-by-side

added added

removed removed

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