Re: [IronPython] How can I exit from Python Script File?

2010-05-06 Thread Thomas Gagne
My question is simpler, how do I exit a regular script? If ARGV.length != 1 puts usage: Process.exit end I get an error calling Process.exit (private member) Process.Exit (method does not exist) sys.Exit (undefined method 'sys' for main:Object) How do I quit my script?

Re: [IronPython] How can I exit from Python Script File?

2010-05-06 Thread Brian Curtin
On Thu, May 6, 2010 at 10:58, Thomas Gagne tgga...@gmail.com wrote: My question is simpler, how do I exit a regular script? If ARGV.length != 1 puts usage: Process.exit end I get an error calling Process.exit (private member) Process.Exit (method does not exist) sys.Exit

Re: [IronPython] How can I exit from Python Script File?

2010-05-06 Thread Dave Fugate
: Thursday, May 06, 2010 8:59 AM To: Discussion of IronPython Subject: Re: [IronPython] How can I exit from Python Script File? My question is simpler, how do I exit a regular script? If ARGV.length != 1 puts usage: Process.exit end I get an error calling Process.exit (private member

Re: [IronPython] How can I exit from Python Script File?

2010-05-06 Thread Thomas Gagne
That's what happens when you try learning too many languages at once... It was IronRuby, and I meant to ask it in an IronRuby list. Whoops! ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] How can I exit from Python Script File?

2010-02-16 Thread Mark Grice
Michael Foord fuzzy...@voidspace.org.uk Wrote: That will throw a SystemExit exception. You can have exception handling in your C# that catches this specific error. Doh! Yeah... should have checked that. I just didn't figure calling sys.Exit() was a code exception, so I thought it was something

[IronPython] How can I exit from Python Script File?

2010-02-15 Thread Mark Grice
I am using IronPython within a C# .NET application. I have a class that the Python code uses, so I create a scope and set the variable, then execute the engine like this: private ScriptEngine scptEngine = null; private ScriptRuntime scptRuntime = null; private ScriptScope

Re: [IronPython] How can I exit from Python Script File?

2010-02-15 Thread Michael Foord
On 15/02/2010 21:54, Mark Grice wrote: I am using IronPython within a C# .NET application. I have a class that the Python code uses, so I create a scope and set the variable, then execute the engine like this: private ScriptEngine scptEngine = null; private ScriptRuntime