Terry J. Reedy <[email protected]> added the comment:
You tried to run editor code and ran into a uncaught idle-process bug, which
causes an exit.
pyshell.ModifiedInterpreter.runcode: 760-1
if self.tkconsole.executing:
self.interp.restart_subprocess()
The immediate bug is that 'self' *is* the interpreter with the
restart_subprocess method, so '.interp' needs to be deleted. An easy fix in
itself.
Puzzle 1 is that I expect that 'executing' should be true whenever Shell is not
waiting for a response to '>>>', so that we should be seeing this often. But
it is false when running tkinter code, when sleeping, and when waiting for
input(prompt) response, so I don't know how it was ever true for you.
I don't remember ever seeing this exception. I will look at the code that sets
and resets it. Maybe the former is not being called when it should be.
Puzzle 2 is that the subprocess *is* being restarted even with this code being
(normally) skipped. Is it ever needed, even in the (unknown) circumstance that
'executing' is true? Or would that cause two restarts? This would be a new
buglet, though preferable to the current exception exit. The easy fix may not
be enough.
'executing' and other shell booleans are still set as 0 and 1. I may update
these first.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38002>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com