eelbrain.save.pickle

eelbrain.save.pickle(obj, dest=None, protocol=5)

Pickle a Python object.

Parameters
  • obj (Any) – Python object to save.

  • dest (Union[Path, str, None]) – Path to destination where to save the file. If no destination is provided, a file dialog is shown. If a destination without extension is provided, .pickle is appended.

  • protocol (int) –

    Pickle protocol (default is pickle.HIGHEST_PROTOCOL).

    Warning

    Later versions of Python support higher versions of the pickle protocol. For pickles that can be opened in Python 2, use protocol<=2. For pickles that can be opened in Python ≤ 3.7, use protocol<=4.

See also

save.pickle