This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/intern/python/modules/mcf/utils/extpkl.py
Hans Lambermont 12315f4d0e Initial revision
2002-10-12 11:37:38 +00:00

20 lines
488 B
Python

'''
Make either cPickle or pickle available as the virtual
module mcf.utils.pickle. This allows you to use a single
import statement:
from mcf.utils import extpkl, pickle
and then use that pickle, knowing that you have the best
available pickling engine.
'''
defaultset = ('import cPickle', 'cPickle')
import sys, mcf.utils
from mcf.utils import cpickle_extend
try:
import cPickle
pickle = cPickle
except:
import pickle
sys.modules['mcf.utils.pickle'] = mcf.utils.pickle = pickle