[IronPython] Is it possible to set a maximum loop size for scripts?

2009-04-18 Thread theoobe
I have a C# application with IronPython scripting. I wonder, is it possible to prevent users from creating infinite loops in their scripts? So for example, if a script is executed which contains a loop, and loop is infinate, would it be possible for my C# application to detect this, perhaps by

Re: [IronPython] Is it possible to set a maximum loop size for scripts?

2009-04-18 Thread Alex News
In the general case this isn't possible: http://en.wikipedia.org/wiki/Halting_problem Perhaps some sort of timeout logic would work for you? I.e. kill the script if it is still running after some predetermined amount of time. I do not know if IronPython has any such functionality built in, but

Re: [IronPython] Is it possible to set a maximum loop size for scripts?

2009-04-18 Thread Michael Foord
Alex News wrote: In the general case this isn't possible: http://en.wikipedia.org/wiki/Halting_problem Well it's not strictly a halting problem. The question isn't whether it will *ever* terminate but just is it taking too long. IronPython doesn't include this functionality built in

Re: [IronPython] Failing to find overload match when object is None

2009-04-18 Thread Dino Viehland
Yeah, I saw that too :( I think we can definitely add a message for None so that this gets better. At the very least we can report all of the types of arguments that we received so the None is at least in your face. In general we want to improve all of our error messages as they're frequently