new move towards cloud of 3D points
[JPSSData.git] / saveload.py
blobcfabaeed6a691f11c1beafaae53c456de6e540a8
1 # a simple utility to save to file and load back
2 import pickle
4 def save(obj,file):
5 """
6 :param obj: object to be saved
7 :param file: file name
8 """
9 with open(file,'wb') as f:
10 pickle.dump(obj,f,protocol=-1)
12 def load(file):
13 """
14 :param file: file name
15 :return: the object read
16 """
17 with open(file,'rb') as f:
18 return pickle.load(f)