sys.exit() raise SystemExit() exception which could be caught and if
not caught, terminate only the current thread. If your program is
multi-threaded and you want to terminate the process, i.e all threads,
immediately then use os._exit(1)<br><br><div class="gmail_quote">On Tue, Dec 16, 2008 at 7:52 AM, Miki <span dir="ltr"><<a href="mailto:miki.tebeka@gmail.com">miki.tebeka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<div class="Ih2E3d"><br>
> How can I return a non-zero status result from the script? Just do a<br>
> return 1? at the end?<br>
</div>raise SystemExit(1)<br>
<br>
HTH,<br>
<font color="#888888">--<br>
Miki <<a href="mailto:miki.tebeka@gmail.com">miki.tebeka@gmail.com</a>><br>
<a href="http://pythonwise.blogspot.com" target="_blank">http://pythonwise.blogspot.com</a><br>
</font><div><div></div><div class="Wj3C7c">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>