Hi,
I have the following code (just a test):
var engine = Python.CreateEngine(); var runtime = engine.Runtime;
try
{
dynamic test = runtime.UseFile(@"d:\test.py");
test.SetVariable("y", 4);
test.SetVariable("client", UISession.ControllerClient);
test.Simple();
}
catch (Exception ex)
{
var eo = engine.GetService<ExceptionOperations>();
Console.WriteLine(eo.FormatException(ex));
}
But I would like to load the script from a string instead.