Why I cannot Exit python shell ??

J

Jia Lu

Hi all.

After using python shell (IDLE) for a while, I typed commands below
to exit . But error ocurred.

Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
raise SystemExit
SystemExit
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
sys.exit(0)
SystemExit: 0['__builtins__', '__doc__', '__name__', 'os', 'sys', 'time']

Why??
 
F

Fredrik Lundh

Jia said:
After using python shell (IDLE) for a while, I typed commands below
to exit . But error ocurred.

Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
raise SystemExit
SystemExit
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
sys.exit(0)
SystemExit: 0['__builtins__', '__doc__', '__name__', 'os', 'sys', 'time']

Why??

because IDLE catches all exceptions, including SystemExit. to quit
IDLE, just type "quit()", or close the window.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top