[IronPython] SetGlobal and GetGlobal in IPbeta 9
Shri.Borde at microsoft.com
Wed Jul 12 16:52:35 PDT 2006
The model for the hostig APIs is that a module (represented by EngineModule) is basically an IDictionary<string, object>, just like in Python (for the most part).
The user can create a IDictionary<string, object> if she wants a customized implementation of a dictionary. This will allow the user to override reads and writes to the dictionary and implement logging, lazy lookup etc. For simple scenarios, the simpler overloads of PythonEngine.CreateModule create an Dictionary<string, object> for you.
We also removed the requirement of using SymbolIDs to simplify the API. Instead, we translate to SymbolIDs under the hood.
All the properties of the DefaultModule are also exposed directly on the PythonEngine for ease of use.
So your code can be adapted as such:
public static List get_analogous_concepts(string textnode)
cn_pe.Global["textnode"] = textnode);
catch (Exception ex)
Do you want to help develop Dynamic languages on CLR? (http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of JoeSox
Sent: Wednesday, July 12, 2006 4:37 PM
To: Discussion of IronPython
Subject: Re: [IronPython] SetGlobal and GetGlobal in IPbeta 9
Ok, I am looking over the release notes one more time, and it looks
like I need to create a Dictionary<string, object> to store all of the
Do I need to also create a EngineModule?
This is why I am getting confused. Thanks
On 7/12/06, JoeSox <joesox at gmail.com> wrote:
> Sorry, I am now confused. I don't understand how I need to update my
> implementation of PythonEngine.SetGlobal and GetGlobal
users mailing list
users at lists.ironpython.com
More information about the users