예제 #1
0
        private PuffinPython()
        {
            if (srcDir == null || srcDir.Length == 0)
            {
                srcDir = @"c:\bbd\python\source";
            }
            if (runDir == null || runDir.Length == 0)
            {
                runDir = @"c:\bbd\python\runtime";
            }
            engine = new PythonEngine();
            sbout  = new MemoryStream();
            sberr  = new MemoryStream();
            loaded = new StringBuilder();
            EngineModule agent = engine.CreateModule("agentModule", true);

            puffinAgent = new PuffinAgent();
            agent.Globals.Add("agent", puffinAgent);
            engine.SetStandardOutput(sbout);
            engine.SetStandardError(sberr);
            engine.AddToPath(runDir);
            WritePy("INTRINSICS", Code());
            WriteDB();
        }
예제 #2
0
파일: Main.cs 프로젝트: VincentRisi/jportal
 private PuffinPython()
 {
     if (srcDir == null || srcDir.Length == 0)
     srcDir = @"c:\vlab\python\source";
       if (runDir == null || runDir.Length == 0)
     runDir = @"c:\vlab\python\runtime";
       engine = new PythonEngine();
       sbout = new MemoryStream();
       sberr = new MemoryStream();
       loaded = new StringBuilder();
       EngineModule agent = engine.CreateModule("agentModule", true);
       puffinAgent = new PuffinAgent();
       agent.Globals.Add("agent", puffinAgent);
       engine.SetStandardOutput(sbout);
       engine.SetStandardError(sberr);
       engine.AddToPath(runDir);
       WritePy("INTRINSICS", Code());
       WriteDB();
 }