Python 2.6 and sys.exit()

H Krishnan hetchkay at gmail.com
Fri Nov 13 04:27:31 CET 2009


Hello,

I have the following in exit.py:
import sys
sys.exit(0)

I now try 'python -i exit.py':

In 2.5, the script exits as I would expect.

In 2.6, the following error is printed:

Traceback (most recent call last):
  File "exit.py", line 2, in <module>
    sys.exit(0)
SystemExit: 0
>>>

I couldn't find anything related to this in "What's new in 2.6".

Is there any way I can get 2.6 to behave like 2.5?

Thank you for your help,

Regards,
H. Krishnan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091113/8b5c27eb/attachment.html>


More information about the Python-list mailing list