Re: [IronPython] Don't execute files containing errors?

2010-02-19 Thread Alex Turpin
script into a temporary scope if you knew that you were only setting variables. If it succeeds, then run it into a "real" scope. The problem is that an arbitrary script can have side effects. Consider the following short script: import sys sys.path = [] To protect against that, you effectively

[IronPython] Don't execute files containing errors?

2010-02-18 Thread Alex Turpin
Hey all, I am currently embedding IronPython in a C# app of mine. I need to execute external script files, but to also be able to only executes the ones that will be error free. Here is an example script: a = "This is a test" print undefinedVariable b = "This is another test" If I execute this s