Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Why I cannot Exit python shell ??

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


Roka100 at gmail

Oct 22, 2006, 8:24 AM

Post #1 of 2 (152 views)
Permalink
Why I cannot Exit python shell ??

Hi all.

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

>>> raise SystemExit

Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
raise SystemExit
SystemExit
>>> sys.exit(0)

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

Why??

--
http://mail.python.org/mailman/listinfo/python-list


fredrik at pythonware

Oct 22, 2006, 8:29 AM

Post #2 of 2 (131 views)
Permalink
Re: Why I cannot Exit python shell ?? [In reply to]

Jia Lu wrote:

> After using python shell (IDLE) for a while, I typed commands below
> to exit . But error ocurred.
>
>>>> raise SystemExit
>
> Traceback (most recent call last):
> File "<pyshell#10>", line 1, in <module>
> raise SystemExit
> SystemExit
>>>> sys.exit(0)
>
> Traceback (most recent call last):
> File "<pyshell#11>", line 1, in <module>
> sys.exit(0)
> SystemExit: 0
>>>> dir()
> ['__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>

--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.