[IronPython] Time out

Saeli Mathieu saeli.mathieu at gmail.com
Fri Jul 23 15:49:14 CEST 2010


I'm sending this email to get more information about a specific using of
I'm working on a Silverlight 4 project and I'm using IronPython
to execute script inside my C# code.

The main objective is to allow users to code an AI and send it into our
The AI will use the C# we made.
That's works fine. :)

But I want to prevent the user to create an infinite loop.
I browsed the Online documentation but I couldn't find any information about
"time out execution"

Func<bool> func = scope.GetVariable<Func<bool> >("MainLoop");
this.Result = func().ToString();

this.Result will contain a string with the error of the Python Script if
something wrong appended. ex: indentation or anything else.

but I want to make the method scope.GetVariable<>() time out if the script
contain an infinite loop.

Does anybody know something about that ?

Saeli Mathieu.

+33 6 45 32 78 47
{Epitech} 2012
Permanent GDL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100723/4bfaee22/attachment.html>

More information about the Ironpython-users mailing list