Skip to content

Method ExecuteCodeWithPaste

Namespace: Belay.Core
Assembly: Belay.Core.dll

ExecuteCodeWithPaste(Stream, string, CancellationToken)

Executes Python code with large transfer support using Raw-Paste mode.

csharp
public static Task<string> ExecuteCodeWithPaste(Stream stream, string pythonCode, CancellationToken cancellationToken = default)

Parameters

stream Stream

The communication stream to the device.

pythonCode string

The Python code to execute.

cancellationToken CancellationToken

Cancellation token for the operation.

Returns

Task<string>

The output from the device.

Released under the Apache License 2.0.