Workspace#
- class Workspace(*args, **kwargs)[source]#
The Workspace object provides the highest level of adminstrative control over active OpenPNM sessions.
It is a
dictionary
that stores a list of all open Projects by name.This class is a singleton so that whenever and wherever a Workspace is instantiated, the same instance is obtained. This allows it to maintain a definitive record of all open Projects.
See also
Notes
The Workspace object contains a variety of functions that one might expect from the ‘file-menu’ in a typical GUI.
Methods
close_project
(project)Removes the specified Project from the Workspace
copy_project
(project[, name])Makes a copy of an existing Project
load_project
(filename)Loads a Project from the specified 'pnm' file
load_workspace
(filename)Loads project(s) from a saved workspace into current workspace
new_project
([name])Creates a new empty Project object
save_project
(project[, filename])Saves given Project to a
pnm
filesave_workspace
([filename])Saves all projects in the current workspace as a single file