Table of Contents

Class Exec

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

Represents an operator that executes a Python script in the specified top-level module.

public class Exec : Combinator<PyModule>
Inheritance
Combinator<PyModule>
Exec
Inherited Members

Properties

Module

Gets or sets the top-level module on which to execute the Python script.

public PyModule Module { get; set; }

Property Value

PyModule

Script

Gets or sets the Python script to evaluate.

public string Script { get; set; }

Property Value

string

Methods

Process(IObservable<RuntimeManager>)

Executes a script in the main module of the Python runtime.

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

Parameters

source IObservable<RuntimeManager>

A sequence containing the Python runtime in which to execute the script.

Returns

IObservable<PyModule>

A sequence containing the Python.Runtime.PyModule object representing the top-level module where the Python script was executed.

Process(IObservable<PyModule>)

Executes a Python script in an observable sequence of modules.

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

Parameters

source IObservable<PyModule>

The sequence of modules in which to execute the Python script.

Returns

IObservable<PyModule>

An observable sequence that is identical to the source sequence but where there is an additional side effect of executing the Python script in each of the Python.Runtime.PyModule objects.

Process<TSource>(IObservable<TSource>)

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

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

Parameters

source IObservable<TSource>

The sequence of notifications used to trigger execution of the Python script.

Returns

IObservable<PyModule>

A sequence of Python.Runtime.PyModule objects representing the top-level module where each Python script was executed.

Type Parameters

TSource

The type of the elements in the source sequence.