Package mvpa :: Package support :: Module copy
[hide private]
[frames] | no frames]

Source Code for Module mvpa.support.copy

 1  # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- 
 2  # vi: set ft=python sts=4 ts=4 sw=4 et: 
 3  ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## 
 4  # 
 5  #   See COPYING file distributed along with the PyMVPA package for the 
 6  #   copyright and license terms. 
 7  # 
 8  ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## 
 9  """Support for python's copy module. 
10   
11  """ 
12   
13  __docformat__ = 'restructuredtext' 
14   
15  import sys 
16   
17  # We have to use deepcopy from python 2.5, since otherwise it fails to 
18  # copy sensitivity analyzers with assigned combiners which are just 
19  # functions not functors 
20  if sys.version_info[:2] >= (2, 6): 
21      # enforce absolute import 
22      _copy = __import__('copy', globals(), locals(), [], 0) 
23      copy = _copy.copy 
24      deepcopy = _copy.deepcopy 
25  else: 
26      from mvpa.support._copy import copy, deepcopy 
27