[IronPython] get exit status from SystemExit exception

Dino Viehland dinov at exchange.microsoft.com
Thu Jan 19 23:26:18 CET 2006

The CLR exception doesn't expose this, instead it's packed away in the Python exception.  The python exception is accessible from the Data dictionary, and then you'd have to get the dictionary from the old-style class...  

We do have a GetExitCode(PythonSystemExit) API on PythonEngine but it's private.  As a temporary work around you can make that public and call it.

I'll look into adding a ExitCode property to PythonSystemExit that you can use in the future.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Paul Moore
Sent: Wednesday, January 18, 2006 5:28 PM
To: users at lists.ironpython.com
Subject: [IronPython] get exit status from SystemExit exception

Can I get that exit status somehow?
I have hosted the ip engine and catch the exeption - seems like the exit code would be a nice thing to have

More information about the Ironpython-users mailing list