Why I cannot Exit python shell ??
Fredrik Lundh
fredrik at pythonware.com
Sun Oct 22 11:29:04 EDT 2006
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>
More information about the Python-list
mailing list