Hi all,

 

I'm working on embedding IronPython in a C# application and would like
to have a single, global module where I expose my objects and run
scripts, and have multiple views into that state.

 

For example, I want to have one (or more) IronPython console views that
provide an interactive prompt that the user can type in and execute
code.  If I enter a function/variable in one of the consoles, then it is
also available in the others. (ie, I enter "x=1" in console A and in
console B I can say "print x" and see "1" output.)  I also want to
execute much larger, non-interactive scripts that a user can write and,
again, this state is shared across all my IronPython views.

 

So, am I just thinking about this wrong?  How are people embedding
IronPython in their apps?  It seems strange (and inefficient) to have to
create a new PythonEngine and add all the references and expose globals
every time I want to execute script.  Is there a way to share some of
this state?  Can this be done using EngineModules?

 

Any thoughts would be appreciated.

 

Thanks.

 

Chris.

 

_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to