evariste.shared

Share global data between evariste objects.

More information in Plugin.shared.

class evariste.shared.Shared(builder, **kwargs)[source]

Shared data

get_plugin_view(keyword: str) _SharedView[source]

Get this data, from the point of view of a plugin.

Let’s define a shared object, and its “plugin view”:

shared = Shared(...)
view = self.get_plugin_view(foo)

Now, when both getting and setting data:

  • view.plugin is equivalent to shared.plugin[foo];

  • view.tree[bar] is equivalent to shared.tree[bar][foo];

  • view.setup is equivalent to shared.setup[foo].

get_tree_view(path: str) _SharedView[source]

Get this data, from the point of view of a tree.

Let’s define a shared object, and its “plugin view”:

shared = Shared(...)
view = self.get_tree_view(foo)

Now, when both getting and setting data:

  • view.tree[bar] is equivalent to shared.tree[foo][bar].