I currently use IronPython 2, and create my ScriptEngine instances using code like this:
_engine = Python.CreateEngine();
_engine.SetPaths(...);
_engine.Runtime.SetHostVariables(...);
I recently found code samples that create the engine using a different approach (which I might have to adopt as I need to support both IronPython v2 & v3):
var runtime = new ScriptRuntime(scriptRuntimeSetup);
_engine = runtime.GetEngine(languageName);
Is there any difference in the engine being created by both versions of code, requiring changes to code that subsequently uses the engine? And will _engine.Runtime
still give me the correct runtime instance, even though the ScriptRuntime object is being created before the engine in this version of the code?