Table of Contents

Class Get

Namespace
Bonsai.Scripting.Python
Assembly
Bonsai.Scripting.Python.dll

Represents an operator that gets the value of a variable in the specified Python module.

public class Get : Source<PyObject>
Inheritance
Source<PyObject>
Get
Inherited Members

Properties

Module

Gets or sets the Python module containing the variable.

public PyModule Module { get; set; }

Property Value

PyModule

VariableName

Gets or sets the name of the variable to get the value of.

public string VariableName { get; set; }

Property Value

string

Methods

Generate()

Gets the value of a variable in the specified Python module and surfaces it through an observable sequence.

public override IObservable<PyObject> Generate()

Returns

IObservable<PyObject>

A sequence containing the value of the Python runtime variable as a Python.Runtime.PyObject.

Generate<TSource>(IObservable<TSource>)

Gets the value of a variable in the specified Python module whenever an observable sequence emits a notification.

public IObservable<PyObject> Generate<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence of notifications used to get the value of the variable.

Returns

IObservable<PyObject>

A sequence of Python.Runtime.PyObject handles representing the value of the Python runtime variable.

Type Parameters

TSource

The type of the elements in the source sequence.

Process(IObservable<RuntimeManager>)

Gets the value of the specified variable in the main module of the Python runtime.

public IObservable<PyObject> Process(IObservable<RuntimeManager> source)

Parameters

source IObservable<RuntimeManager>

A sequence containing the Python runtime from which to get the value of the specified variable.

Returns

IObservable<PyObject>

A sequence of Python.Runtime.PyObject handles representing the value of the specified variable in the main module of the Python runtime.

Process(IObservable<PyModule>)

Gets the value of the specified variable in each of the Python modules in an observable sequence.

public IObservable<PyObject> Process(IObservable<PyModule> source)

Parameters

source IObservable<PyModule>

The sequence of modules from which to get the value of the specified variable.

Returns

IObservable<PyObject>

A sequence of Python.Runtime.PyObject handles representing the value of the specified variable for each of the modules in the source sequence.