pept.load#

pept.load(filepath)[source]#

Load a binary saved / pickled object from filepath.

Most often the full object state was saved using the pept.save method.

Parameters
filepathfilename or file handle

If filepath is a path (rather than file handle), it is relative to where python is called.

Returns
object

The loaded Python object instance (e.g. pept.LineData).

Examples

Save a LineData instance, then load it back:

>>> lines = pept.LineData([[1, 2, 3, 4, 5, 6, 7]])
>>> pept.save("lines.pickle", lines)
>>> lines_reloaded = pept.load("lines.pickle")