/// <summary> /// 尝试加载脚本 /// </summary> /// <param name="moduleName">相对路径</param> /// <param name="context"></param> /// <returns></returns> public bool TryLoadPython(string moduleName, out PythonContext context) { context = null; try { context = PythonContext.CreateInstance(moduleName); return(context != null); } catch (Exception ex) { TraceLog.WriteError("加载脚本配置:{0}文件,{1}", moduleName, ex); } return(false); }