@ -47,4 +47,17 @@ internal static class PyRunner
}
});
// Evaluate Python code
public static async Task<string> Eval(string code)
{
using (Py.GIL())
return await Task.Run(() =>
dynamic result = PythonEngine.Eval(code);
return result.ToString();