初始化
This commit is contained in:
16
WebAPIServer/Common/StaticData.cs
Normal file
16
WebAPIServer/Common/StaticData.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using IronPython.Hosting;
|
||||
using Microsoft.Scripting.Hosting;
|
||||
|
||||
namespace WebAPIServer.Common
|
||||
{
|
||||
public class StaticData
|
||||
{
|
||||
public static ScriptEngine eng = Python.CreateEngine();
|
||||
public static ScriptScope scope = eng.CreateScope();
|
||||
|
||||
public static void GetWebAPIMethod()
|
||||
{
|
||||
eng.ExecuteFile("ScriptConfig\\webapi.py", scope);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user