コード例 #1
0
        /// <summary>
        /// This can throw any exceptions raised by the code. If PythonSystemExitException is thrown, the host should 
        /// interpret that in a way that is appropriate for the host.
        /// </summary>
        public void Execute(EngineModule engineModule, IDictionary<string, object> locals)
        {
            engine.EnsureValidModule(engineModule);

            ModuleScope moduleScope = engineModule.GetModuleScope(locals);
            Run(moduleScope);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: ralescano/castle
		public Form1()
		{
			EngineOptions options = new EngineOptions();
			eng = new PythonEngine(options);
			eng.Import("site");
			System.IO.FileStream fs = new System.IO.FileStream("scripting-log.txt", System.IO.FileMode.Create);
			eng.SetStandardOutput(fs);
			eng.SetStandardError(fs);

			mod1 = eng.CreateModule("mr", false);

			InitializeComponent();
		}
コード例 #3
0
 public void Execute(EngineModule engineModule)
 {
     Execute(engineModule, null);
 }