[Tutor] import sys; sys.exit()

Andrew Volmensky warewerks at verizon.net
Thu Jan 10 17:39:10 CET 2008

I am going through the tutorial "Simple Sequences" here: http:// 

...and get an error. I have tried saving as exit.py from the editor  
and trying to run it and also entering the commands directly into the  
shell. My understanding is that this is supposed to exit the program,  
but that does not appear to be happening.

This is with MacPython 2.4 - Thanks!

IDLE 1.1.4
 >>> ================================ RESTART  

Traceback (most recent call last):
   File "/Users/andrew/python/exit.py", line 2, in -toplevel-
     sys.exit( )

 >>> import sys
 >>> sys.exit()

Traceback (most recent call last):
   File "<pyshell#1>", line 1, in -toplevel-

More information about the Tutor mailing list