You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fdb66ae
Browse filesBrowse the repository at this point in the historyBrowse files
Write a pickled representation of obj as a string or a file depending on the number and type of arguments used.
177
+
178
+
``pickle_save(obj, file, protocol)`` Write a pickled representation of obj to the open file object file.
179
+
180
+
``pickle_save(obj, protocol)`` Return the pickled representation of the object as a string, instead of writing it to a file.
181
+
"""
182
+
importpickle
183
+
184
+
ifnotf:
185
+
returnpickle.dumps(obj, protocol)
186
+
187
+
pickle.dump(obj, f, protocol)
188
+
189
+
defpickle_load(*args, **kwargs):
190
+
"""
191
+
Read a string or pickled object and reconstruct the original object hierarchy.
192
+
193
+
``pickle_load(file)`` Read a string from the open file object file and interpret it as a pickle data stream, reconstructing and returning the original object hierarchy.
194
+
195
+
``pick_load(str)`` Read a pickled object hierarchy from a string. Characters in the string past the pickled object’s representation are ignored.
0 commit comments