public static void PerformModuleReload( IronPython.Runtime.PythonContext context, IronPython.Runtime.PythonDictionary dict) { context.DomainManager.LoadAssembly(typeof(System.Xml.Linq.XDocument).Assembly); dict["FOO"] = "bar"; System.Console.WriteLine("Module Load"); }
protected override IList <string> GetGlobalsOfLanguage(string name) { List <string> res = new List <string>(); IronPython.Runtime.PythonContext context = IronPython.Runtime.DefaultContext.DefaultPythonContext; foreach (object builtinName in context.BuiltinModuleInstance.Get__dict__().Keys) { string strName = builtinName as string; if (strName != null && strName.StartsWith(name)) { res.Add(strName); } } return(res); }