Skip to content

Commit 7b5eb46

Browse files
Add pickle
you can save (pickle) your objects externally for future usage
1 parent ea6582f commit 7b5eb46

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

_pickle.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pickle
2+
3+
4+
def dump(filepath, obj):
5+
with open(filepath, 'wb') as handler:
6+
return pickle.dump(obj, handler)
7+
8+
9+
def load(filepath):
10+
with open(filepath, 'rb') as handler:
11+
return pickle.load(handler)

0 commit comments

Comments
 (0)