示例#1
0
 private void CompilePython(PythonFileInfo scriptFile)
 {
     try
     {
         var scriptSource = _scriptEngine.CreateScriptSourceFromString(scriptFile.Source, Path.GetFullPath(scriptFile.FileName), SourceCodeKind.File);
         scriptFile.CompiledCode = scriptSource.Compile();
         scriptFile.Source       = null;
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("CompilePython script:{0} error:{1}", scriptFile.FileName, ex);
     }
 }