This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author louielu
Recipients kbk, louielu, ppperry, roger.serwy, terry.reedy
Date 2017-05-22.06:37:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495435043.34.0.163059581469.issue26949@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2017-05-22 06:37:23louielusetrecipients: + louielu, terry.reedy, kbk, roger.serwy, ppperry
2017-05-22 06:37:23louielusetmessageid: <1495435043.34.0.163059581469.issue26949@psf.upfronthosting.co.za>
2017-05-22 06:37:23louielulinkissue26949 messages
2017-05-22 06:37:23louielucreate