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

Brian Curtin brian.curtin at gmail.com
Thu May 6 18:02:42 CEST 2010


On Thu, May 6, 2010 at 10:58, Thomas Gagne <tggagne at 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 (undefined method 'sys' for main:Object)
>
> How do I quit my script?
>

That looks like Ruby to me, but in IronPython you can just call exit() to
exit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100506/34b94207/attachment.html>


More information about the Ironpython-users mailing list