Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1import pickle 

2 

3 

4def _write_pickle(fname, data): 

5 """ Write data to pickle file with filename fname """ 

6 with open(fname, 'wb') as handle: 

7 pickle.dump(data, handle, protocol=pickle.HIGHEST_PROTOCOL) 

8 

9 

10def _read_pickle(fname): 

11 """ Read pickle file and return content """ 

12 with open(fname, 'rb') as handle: 

13 return pickle.load(handle)