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)
On Tue, Dec 16, 2008 at 7:52 AM, Miki <miki.teb...@gmail.com> wrote: > Hello, > > > How can I return a non-zero status result from the script? Just do a > > return 1? at the end? > raise SystemExit(1) > > HTH, > -- > Miki <miki.teb...@gmail.com> > http://pythonwise.blogspot.com > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list