Louie Lu added the comment:
The problem is cause by run.py:main function, when it catch KeyboardInterrupt
or SystemExit, it won't put a blank msg back to response_queue, that cause the
loop in run.py:main triggering except queue.Empty to continue the loop.
So, I think the KeyboardInterrupt hang is a bug, cause by the infinity loop
above, but SystemExit will raise SystemExit again, and break down the loop, let
the shell restart. I think this isn't a bug.
Let's say there is a code like this:
x = 10
print(x)
raise SystemExit
print(x)
When using IDLE to run this file without debugger, it will print 10 and leave
below code. But when you type "x" in the shell, it will pop up 10, that means
the shell environment didn't exit, still exist inside.
But if you open the debugger, let SystemExit break the loop and restart the
shell, I think this is a normal behavior -- that it should exit the shell (and
restart it)
----------
nosy: +louielu
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26949>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com