pickle_list¶
- sofia_redux.toolkit.utilities.multiprocessing.pickle_list(object_list, prefix=None, naming_attribute=None, class_type=None)[source]¶
Pickle a list of objects to a temporary directory.
The list will be updated in-place, with each element being replaced by the on-disk file path to the pickle file in which it is saved.
- Parameters:
- object_listlist (object)
A list of things to pickle.
- prefixstr, optional
The prefix for the temporary directory in which to store the pickle files. See
tempfile.mkdtemp()
for further information.- naming_attributestr, optional
The attribute used to name the pickle file. If not supplied, defaults to id(object).
- class_typeclass, optional
If supplied, only objects of this class type will be pickled.
- Returns:
- temporary_directorystr
The temporary directory in which the objects are saved as pickle files.