pickle_object

sofia_redux.toolkit.utilities.multiprocessing.pickle_object(obj, filename)[source]

Pickle a object and save to the given filename.

Parameters:
objobject

The object to pickle.

filenamestr or None

If filename points to a writeable on-disk location, obj will be pickled and saved to that location. If None, nothing will happen.

Returns:
outputstr or object

Either the filename if the object was pickled, or obj if it wasn’t.