Skip to content

Commit

Permalink
- set runtime non static, issues with editor output
Browse files Browse the repository at this point in the history
  • Loading branch information
cesare-montresor committed Dec 29, 2023
1 parent 20788de commit e1d1b92
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Razor/RazorEnhanced/PythonEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class PythonEngine

public Dictionary<string, object> Modules;

public static ScriptRuntime Runtime;
public ScriptRuntime Runtime;
public ScriptEngine Engine { get; }
public ScriptScope Scope { get; set; }
public String Text { get; set; }
Expand All @@ -32,9 +32,7 @@ public class PythonEngine


public PythonEngine() {
if (Runtime == null) {
Runtime = IronPython.Hosting.Python.CreateRuntime();
}
Runtime = IronPython.Hosting.Python.CreateRuntime();
Engine = IronPython.Hosting.Python.GetEngine(Runtime);

//Paths for IronPython 3.4
Expand Down

0 comments on commit e1d1b92

Please sign in to comment.