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(); }
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(); }