1 # a simple utility to save to file and load back
6 :param obj: object to be saved
9 with
open(file,'wb') as f
:
10 pickle
.dump(obj
,f
,protocol
=-1)
14 :param file: file name
15 :return: the object read
19 with
open(file,'rb') as f
:
23 with
open(file,'rb') as f
:
24 return pickle
.load(f
,encoding
='latin1')