Hello,<div><br></div><div>I'm sending this email to get more information about a specific using of ironPython.</div><div>I'm working on a Silverlight 4 project and I'm using IronPython to execute script inside my C# code.</div>
<div><br></div><div>The main objective is to allow users to code an AI and send it into our application.</div><div>The AI will use the C# we made.</div><div>That's works fine. :)</div><div><br></div><div>But I want to prevent the user to create an infinite loop.</div>
<div>I browsed the Online documentation but I couldn't find any information about "time out execution"</div><div><br></div><div>Func<bool> func = scope.GetVariable<Func<bool> >("MainLoop");</div>
<div>this.Result = func().ToString();</div><div><br></div><div>this.Result will contain a string with the error of the Python Script if something wrong appended. ex: indentation or anything else.</div><div><br></div><div>
but I want to make the method scope.GetVariable<>() time out if the script contain an infinite loop.</div><div><br></div><div>Does anybody know something about that ?</div><div><br></div><div>Sincerely</div><div>-- <br>
Saeli Mathieu.<br><br>+33 6 45 32 78 47<br>{Epitech} 2012<br>Permanent GDL<br><a href="http://www.gamelab.epitech.net/">http://www.gamelab.epitech.net/</a><br>
</div>