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

Mark Grice markjoel60 at gmail.com
Tue Feb 16 21:49:10 CET 2010

Michael Foord <fuzzyman at voidspace.org.uk>

>"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 else I was
doing wrong...

Interestingly, when I check the exception message, it is empty. (ie
ex.message == "")

But I can catch that as a quick exit from python and handle it in the C#
code. That's working.  Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100216/c5d862eb/attachment.html>

More information about the Ironpython-users mailing list