SessionsPythonPlugin.ExecuteCodeAsync(String) Method

Definition

Executes the provided Python code. Start and end the code snippet with double quotes to define it as a string. Insert \n within the string wherever a new line should appear. Add spaces directly after \n sequences to replicate indentation. Use "" to include double quotes within the code without ending the string. Keep everything in a single line; the \n sequences will represent line breaks when the string is processed or displayed.

[Microsoft.SemanticKernel.KernelFunction]
public System.Threading.Tasks.Task<string> ExecuteCodeAsync(string code);
[<Microsoft.SemanticKernel.KernelFunction>]
member this.ExecuteCodeAsync : string -> System.Threading.Tasks.Task<string>
Public Function ExecuteCodeAsync (code As String) As Task(Of String)

Parameters

code
String

The valid Python code to execute.

Returns

The result of the Python code execution.

Attributes

Exceptions

Applies to