On Thursday, June 1st, 2023 at 2:37 PM, Tal Einat wrote: > IDLE's use of a sub-process is not primarily about security. > > If one were to run user code within the same Python process (as IDLE > originally did!), then the Python interpreter would be shared between the > user code and IDLE. > > (It is today possible to run a (nearly entirely) separate Python interpreter > within the same process, but that is a relatively new development from recent > years.) > > Sharing the interpreter is a problem for various reasons, led by: > * User code can break IDLE in many interesting and unexpected ways. > * User code can block the main thread, which would make IDLE unresponsive. > > There are many other reasons too. For example, the "restart interpreter" > feature is much harder, perhaps impossible, to implement. > > Let me know if you'd like any further details. > - Tal Einat Hi Tal,
This is a great answer, thank you so much! I didn't consider that blocking the main thread could be a problem. However, I would be interested to see in what additional "interesting and unexpected ways" one could break IDLE. Thank you, Jim _______________________________________________ IDLE-dev mailing list IDLE-dev@python.org https://mail.python.org/mailman/listinfo/idle-dev