a/trunk/cforge/cforge/Helper.cs | b/trunk/cforge/cforge/Helper.cs | ||
---|---|---|---|
... |
... |
||
280 | } |
280 | } |
281 | sys.path.Add(GetCFORGEScriptPath()); |
281 | sys.path.Add(GetCFORGEScriptPath()); |
282 | sys.path.Add(strScriptingPath); |
282 | sys.path.Add(strScriptingPath); |
283 | 283 | ||
284 | var source = engine.CreateScriptSourceFromFile(scriptfile); |
284 | var source = engine.CreateScriptSourceFromFile(scriptfile); |
285 | dynamic result = source.Execute(); |
285 | source.Execute(); |
286 | 286 | ||
287 | //Console.WriteLine("Script finished"); |
287 | //Console.WriteLine("Script finished"); |
288 | } |
288 | } |
289 | catch (IronPython.Runtime.Exceptions.SystemExitException ex) |
289 | catch (IronPython.Runtime.Exceptions.SystemExitException ex) |
290 | { |
290 | { |
... |
... |
||
318 | Console.WriteLine("[ERROR] Cannot execute command: no such file or directory: " + scriptfile); |
318 | Console.WriteLine("[ERROR] Cannot execute command: no such file or directory: " + scriptfile); |
319 | return; |
319 | return; |
320 | } |
320 | } |
321 | 321 | ||
322 | ScriptRuntime runtime; |
322 | ScriptRuntime runtime; |
323 | ScriptEngine engine; |
||
324 | runtime = Python.CreateRuntime(); |
323 | runtime = Python.CreateRuntime(); |
325 | engine = Python.GetEngine(runtime); |
324 | Python.GetEngine(runtime); |
326 | 325 | ||
327 | 326 | ||
328 | 327 | ||
329 | try |
328 | try |
330 | { |
329 | { |