Table of Contents

Class CreateRuntime

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

Represents an operator that creates a Python runtime object which can be used to import modules, evaluate expressions, and pass data to and from a Python scope.

public class CreateRuntime : Source<RuntimeManager>
Inheritance
CreateRuntime
Inherited Members

Properties

PythonHome

Gets or sets the location where the standard Python libraries are installed.

public string PythonHome { get; set; }

Property Value

string

Remarks

If no location is specified, the runtime will be created from the currently activated Python virtual environment.

ScriptPath

Gets or sets the path to the Python script file to run on runtime initialization.

[FileNameFilter("Python Files (*.py)|*.py|All Files|*.*")]
public string ScriptPath { get; set; }

Property Value

string

Methods

Generate()

Creates an observable sequence that initializes a Python runtime object which can be used to import modules, evaluate expressions, and pass data to and from a Python scope.

public override IObservable<RuntimeManager> Generate()

Returns

IObservable<RuntimeManager>

An observable sequence that initializes and returns a RuntimeManager object on subscription. On cancellation, the runtime object is disposed.