server/sources/native.py
changeset 9990 c84ad981fc4a
parent 9892 928732ec00dd
parent 9984 793377697c81
child 10000 4352b7ccde04
equal deleted inserted replaced
9974:b240b33c7125 9990:c84ad981fc4a
    23   string. This is because it should actually be Bytes but we want an index on
    23   string. This is because it should actually be Bytes but we want an index on
    24   it for fast querying.
    24   it for fast querying.
    25 """
    25 """
    26 __docformat__ = "restructuredtext en"
    26 __docformat__ = "restructuredtext en"
    27 
    27 
    28 try:
    28 from cPickle import loads, dumps
    29     from cPickle import loads, dumps
    29 import cPickle as pickle
    30     import cPickle as pickle
       
    31 except ImportError:
       
    32     from pickle import loads, dumps
       
    33     import pickle
       
    34 from threading import Lock
    30 from threading import Lock
    35 from datetime import datetime
    31 from datetime import datetime
    36 from base64 import b64decode, b64encode
    32 from base64 import b64decode, b64encode
    37 from contextlib import contextmanager
    33 from contextlib import contextmanager
    38 from os.path import basename
    34 from os.path import basename