Session regroups all the data which can be stored between different executions of the system.

class core.session.Session[source]

Bases: openalea.grapheditor.observer.Observed

A session is composed by different workspaces, and an user package. A workspace is an open node A session can be saved on disk.

add_graph_view(view)[source]
add_workspace(compositenode=None, notify=True)[source]

Open a new workspace in the session if compositenode = None, create a new empty compositenode

clear(create_workspace=True)[source]

Reinit Session

close_workspace(index, notify=True)[source]

Close workspace at index

get_current_workspace()[source]

Return the current workspace object

get_graph_views()[source]
init(create_workspace=True)[source]

Init the Session

load(filename)[source]

Load session data from filename

load_module(name, path)[source]
save(filename=None)[source]

Save session in filename user_pkg and workspaces data are saved

Be careful, this method do not work very well if data are not persistent.

simulate_workspace_addition()[source]
USR_PKG_NAME = '__my package__'
ws

Return the current workspace object

Previous topic

<no title>

Next topic

<no title>

This Page