Table of Contents

Class Eval

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

Represents an operator that evaluates a Python expression in the specified top-level module.

public class Eval : Combinator<PyObject>
Inheritance
Combinator<PyObject>
Eval
Inherited Members

Properties

Expression

Gets or sets the Python expression to evaluate.

public string Expression { get; set; }

Property Value

string

Module

Gets or sets the top-level module on which to evaluate the Python expression.

public PyModule Module { get; set; }

Property Value

PyModule

Methods

Process(IObservable<RuntimeManager>)

Evaluates an expression 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 in which to evaluate the expression.

Returns

IObservable<PyObject>

A sequence of Python.Runtime.PyObject handles representing the result of evaluating the Python expression.

Process(IObservable<PyModule>)

Evaluates a Python expression in an observable sequence of modules.

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

Parameters

source IObservable<PyModule>

The sequence of modules in which to evaluate the Python expression.

Returns

IObservable<PyObject>

A sequence of Python.Runtime.PyObject handles representing the result of evaluating the Python expression.

Process<TSource>(IObservable<TSource>)

Evaluates a Python expression in the specified top-level module whenever an observable sequence emits a notification.

public override IObservable<PyObject> Process<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence of notifications used to trigger evaluation of the Python expression.

Returns

IObservable<PyObject>

A sequence of Python.Runtime.PyObject handles representing the result of evaluating the Python expression.

Type Parameters

TSource

The type of the elements in the source sequence.