[IronPython] CustomSymbolDictionary question

R. Bear Smith rbear at rbear.net
Mon Mar 2 20:53:41 CET 2009

Hi all,


I have a situation where I need to run a script many times with a different
scope each time.  I want to be able to substitute an instance of a class
each time it is asked for.   For example,


x = MyCSharpClass()


Using CustomSymbolDictionary I am able to store the class created on the
first call and then substitute it for every additional call to x from
different scopes.  While this works to provide the same class instance to
every scope, a new class is being created on every call and replaced with
the original class.  Is there a way to only create the class once.  The
script will be user code so I have no prior knowledge of variable names and
such.  Any ideas would be appreciated.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090302/2f505474/attachment.html>

More information about the Ironpython-users mailing list