[IronPython] SetGlobal and GetGlobal in IPbeta 9

JoeSox joesox at gmail.com
Thu Jul 13 01:27:14 CEST 2006

Sorry, I am now confused.  I don't understand how I need to update my
implementation of PythonEngine.SetGlobal and GetGlobal

I looked around in beta 9 and figured I probably figure it out faster
by posting here. And I am also wondering if I am going to lose some
scope.  I have a bunch of C# methods that look like this:
        public static List get_analogous_concepts(string textnode)
                IronPython.Runtime.SymbolId textnode_SymbolId =
                cn_pe.SetGlobal(textnode_SymbolId, textnode);

                IronPython.Runtime.SymbolId r_SymbolId = (SymbolId)"r";


                return (List)cn_pe.GetGlobal(r_SymbolId);

            catch (Exception ex)
                MessageBox.Show(ex.ToString(), ex.Message);
                //return ex.Message;
                return List.MakeEmptyList(4);

Do I need to use cn_pe.DefaultModule.Globals now? And if so, how?
Later, Joe

More information about the Ironpython-users mailing list