There's a int GetExitCode(out object nonIntegerCode) API on 
PythonSystemExitException that will return you the integer exit code or a 
Python object if the user did sys.exit('foo') or something easily insane.  In 
that what you're looking for?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Moore
Sent: Monday, November 13, 2006 3:38 PM
To: Discussion of IronPython
Subject: [IronPython] Sys.exit request

I did ask before but I guess it got lost.

Can the PythonSystemExitException please have the parameter passed to
exit in it

So if I do

exit(12)

Then I can do

Catch(PythonSystemExitException ex)
{
        if((int)ex.ExitCode == 12)
                .......
}
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to