load_object_from_file

classmethod Pickle.load_object_from_file(filename, project=None)[source]

Loads an OpenPNM object from a file on disk

Parameters
  • filename (str or path object) – The name of the file containing the object to open. Can be a relative or absolute path, and can be a string or path object such as that produced by pathlib.

  • project (Project) – If not provided one will be created and returned by this function, otherwise the loaded object will be added to the given project.

Returns

project – If no Project object is specified then one is created. A handle to the Project is returned.

Return type

Project