Method ExecutePython<T>
Namespace: Belay.Core
Assembly: Belay.Core.dll
ExecutePython<T>(string, CancellationToken)
Executes Python code on the device and parses the result as the specified type.
csharp
public Task<T> ExecutePython<T>(string code, CancellationToken cancellationToken = default)
Parameters
code
string
The Python code to execute.
cancellationToken
CancellationToken
Cancellation token for the operation.
Returns
Task<T>
The parsed result from the device.
Type Parameters
T
The type to parse the result as.
ExecutePython(string, CancellationToken)
Executes Python code on the device and returns the raw string output.
csharp
public Task<string> ExecutePython(string code, CancellationToken cancellationToken = default)
Parameters
code
string
The Python code to execute.
cancellationToken
CancellationToken
Cancellation token for the operation.
Returns
The raw string output from the device.