Hi,
i had the same problem (hierarchical script scopes) and solved it by implementing my own SymbolDictionary (exactly BaseSymbolDictionary) So I can use the vars defined along the hierarchy like in scopes in c#. Rainer Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Seshadri Pillailokam Vijayaraghavan Gesendet: Sonntag, 10. August 2008 06:18 An: Discussion of IronPython Betreff: Re: [IronPython] Is there a way to create a new ScriptScopethat inherits from global ScriptScope? Currently there isn't a way to create a new ScriptScope object based on an existing one. If I understand your query correctly, you can do what you want by iterating over the items of an existing object and copy them over the newer one as soon as your create a new one. Won't this work for you? ScriptScope newScope = _pyEng.CreateScope(); foreach (var item in existingScope.Items) { newScope.SetVariable(item.Key, item.Value); } Thanks sesh From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy.Tao Sent: Saturday, August 09, 2008 12:08 AM To: Users Subject: [IronPython] Is there a way to create a new ScriptScope that inherits from global ScriptScope? HI guys, Is there a way to create a new ScriptScope that inherits from global ScriptScope? I want to do it like this: first step: expose some object model to global scope and some global variables; second step: execute task script in independ scope to avoid modify global objects and variables. thanks in advanced. ------------------ Andy Tao
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com