<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-html" lang="x-western">
<font size="-1"><font face="Verdana">I'm currently attempting to embed
the IronPython 2 runtimes into an existing application written in C#.
However, I find the amount of documentation lacking on what I'm trying
to do. I currently have a proof-of-concept version which uses Lua and
LuaInterface, but the people who have to write the scripts dislike
Lua(Well, more hate it with a passion)
and would love to see this working with Python.<br>
My host application is a networked application that must trigger
certain scripts functions on events generated by the connected clients.
The idea is that when my application starts, it will load the
IronPython script environment, launches an 'autoexec.py' which will
load various other scripts files and do some housekeeping. Once this
all is completed, it will start listening to incoming connections.
However, in various scenarios, the application has to trigger scripted
functions when data is received from a client. Which script function is
called is different per client and per event. I have events for
connecting, logging on, disconnecting and a set of data specific
events after receiving data. This highly depends on the received
My question here is: How do I embed IronPython in such a fashion that I
can load my scripts and then trigger various functions within that?
I've seen many examples that just call CreateScriptSourceFromString()
or File each time in which just 1 piece of code is implemented. This is
not suitable for the needs here because the scripted systems can become
quite complex. <br>