Re: [IronPython] Callstack inspection

2006-08-15 Thread Dino Viehland
It's most likely that inspect won't work. But we certainly don't implement sys._getframe which will be necessary to crawl the stack. In the future we're going to look at both what we can do from our side and what could be done from the CLR side to make it easier to implement this feature - in

[IronPython] Callstack inspection

2006-08-15 Thread Gary Stephenson
I would like to adapt the following code to IronPython, but there appears to be no inspect module available. Any clues on how I might proceed? many tias, gary # code begins # a hack to support something like dynamically scoped variables import inspect class _gsDynamicVars( object ): def

Re: [IronPython] expose some namespaces of own application

2006-08-15 Thread Dino Viehland
It is currently an all-or-nothing situation. As a work around you could create your own module (import imp.new_module('modulename')) and then you could add the namespaces onto the new module, then publish the module in sys.modules: import imp import sys mod = imp.new_module('test') mod.abc = '

[IronPython] expose some namespaces of own application

2006-08-15 Thread Stanislas Pinte
Hello, We are using IP as a scripting engine, embedded in one of our products. I would like to be able to expose a subset of the namespaces present in my application assembly (MyApp.exe) to the scripting engine...but hide the rest: i.e. when a user does an "from a.b.c import Bar", if a.b.c is "h