<div dir="ltr">scope.GetVariable&lt;Func&lt;int,int,int,int&gt;&gt; (&quot;Process&quot;)<br><br><div class="gmail_quote">On Tue, Aug 19, 2008 at 12:09 PM, Christian Schmidt <span dir="ltr">&lt;<a href="mailto:christian2.schmidt@gmx.de">christian2.schmidt@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Curt,<br>
<br>
thanks for your answer. It&#39;s an interesting idea, to hand over the items as function arguments. I was trying to add them to the ScriptScope.<br>
<br>
But I&#39;m still stuck with calling the function:<br>
<br>
ScriptScope scope =<br>
 &nbsp;ScriptRuntime.Create().GetEngine(&quot;py&quot;).CreateScope();<br>
scope.Execute(&quot;from math import *&quot;);<br>
scope.Execute(@&quot;<br>
def process(a, b, c):<br>
 &nbsp;return [a+b, sqrt(b*c)]<br>
&quot;);<br>
object process = scope.GetVariable(&quot;process&quot;);<br>
foreach(object[] row in data)<br>
 &nbsp;object[] result = process(row); // ??<br>
<br>
How do I call the function?<br>
<br>
I have some further question regarding this approach:<br>
<br>
1. Will the function be interpreted on each call or is it compiled?<br>
2. Is the number of arguments limited? I could have up to 200 arguments.<br>
<br>
Meanwhile I&#39;ve tried the CustomSymbolDictionary way, but couldn&#39;t find any helpful tutorial.<br>
<br>
Thanks for your time,<div><div></div><div class="Wj3C7c"><br>
Christian<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://nomadlife.org">nomadlife.org</a><br><br>
</div>