Ned Deily <n...@python.org> added the comment:

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!

----------
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35211>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to