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 ned.deily
Recipients bmoth, eric.smith, gregorlingl, ned.deily, ronaldoussoren, willingc, xtreak
Date 2018-11-11.20:36:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541968601.16.0.788709270274.issue35211@psf.upfronthosting.co.za>
In-reply-to
Content
There seem to be at least two problems here.

One, you say that running the unmodified life.py requires two Quit keyboard shortcuts (usually CMD-Q).  From the shell output you give, that problem is most likely due to the use of -i with python:

'/usr/local/bin/python3' -d -i  '/Users/user2/Downloads/life.py'

-i means that the interpreter should enter its interactive mode after the script exists.  With tkinter-based graphics apps like turtle, you probably do not want to do that as it will inhibit the normal Tk shutdown of the app.

https://docs.python.org/3/using/cmdline.html#cmdoption-i

Without -i, the unmodified life.py terminates fine for me.

Secondly, your modified life2.py does not terminate with a Quit even when running without -i.  (Note that it *does* quit if you select Close from the applications's File menu or if you click on the red close button on the open window.)  From a quick comparison of the unmodified Pygames life.py versus your modified life2.py version, it seems you have changed the order of operations in such a way that the sequence of turtle operations has changed and likely the underlying tkinter event loop is not being called properly thus either ignoring or suppressing the effect of the Quit keyboard shortcut.  Suggest you revise your program to follow the sequence of turtle calls that the original does and be careful if you wish to introduce changes in that.  If you do find what appears to be a bug in turtle or elsewhere in Python, feel free to re-open this with an example and an explanation.  Good luck!
History
Date User Action Args
2018-11-11 20:36:41ned.deilysetrecipients: + ned.deily, ronaldoussoren, gregorlingl, eric.smith, willingc, xtreak, bmoth
2018-11-11 20:36:41ned.deilysetmessageid: <1541968601.16.0.788709270274.issue35211@psf.upfronthosting.co.za>
2018-11-11 20:36:41ned.deilylinkissue35211 messages
2018-11-11 20:36:41ned.deilycreate