bpo-26571-Class variable _RUNNING update at the __init__ end - #30332
Closed
williamnavaraj wants to merge 4 commits into
Closed
bpo-26571-Class variable _RUNNING update at the __init__ end#30332williamnavaraj wants to merge 4 commits into
williamnavaraj wants to merge 4 commits into
Conversation
Initialising the class variable at the end of the object initialisation method. This will help to run this library smoothly in use cases such as in Jupyter or ipython or spyder or GUI or other cell based execution. Will solve problems highlighted repeatedly in these stack overflow posts (With 1000s of views, current suggestions are some non-elegant work arounds such as importlib.reload(turtle) or or try-except and initializing again in the except as the _RUNNING becomes true at the end of last run or manually setting the _RUNNING flag). More logical turn this to True after the initialization rather than during terminator exception. https://stackoverflow.com/questions/45534458/python-turtle-terminator-even-after-using-exitonclick https://stackoverflow.com/questions/34956937/weird-terminator-error-when-running-python-3-turtle-in-os-x https://stackoverflow.com/questions/70252586/turtle-module-for-langtons-ant-in-python-giving-me-raise-terminator-turtle-ter https://stackoverflow.com/questions/58078376/a-function-i-created-can-only-be-called-once-second-time-it-shows-an-error https://stackoverflow.com/questions/54198108/how-can-i-close-a-window-after-using-turtle https://stackoverflow.com/questions/67734319/running-turtle-multiple-times-but-receiving-a-terminator-error-after-the-first-r https://stackoverflow.com/questions/43294665/turtle-done-not-working-in-spyder https://stackoverflow.com/questions/50438762/python-turtle-window-crashes-every-2nd-time-running https://stackoverflow.com/questions/41644324/how-to-close-python-turtle-properly https://stackoverflow.com/questions/41548813/using-turtle-module-exitonclick/70552164 https://stackoverflow.com/questions/66750634/why-do-i-get-a-terminator-error-when-i-run-this-program https://stackoverflow.com/questions/65546812/python-turtle-terminator https://stackoverflow.com/questions/61963565/why-do-i-keep-getting-a-terminator-error-for-python-turtle
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Class variable _RUNNING update at the __init__ end Initialising the class variable at the end of the object initialisation method. This will help to run this library smoothly in use cases such as in Jupyter or ipython or spyder or GUI or other cell based execution. Otherwise it will through raise Terminator error every second time. Will solve problems highlighted repeatedly in these stack overflow posts (With 1000s of views, current suggestions are some non-elegant work arounds such as importlib.reload(turtle) or or try-except and initializing again in the except as the _RUNNING becomes true at the end of last run or manually setting the _RUNNING flag). More logical turn this to True after the initialization rather than during terminator exception. https://stackoverflow.com/questions/45534458/python-turtle-terminator-even-after-using-exitonclick https://stackoverflow.com/questions/34956937/weird-terminator-error-when-running-python-3-turtle-in-os-x https://stackoverflow.com/questions/70252586/turtle-module-for-langtons-ant-in-python-giving-me-raise-terminator-turtle-ter https://stackoverflow.com/questions/58078376/a-function-i-created-can-only-be-called-once-second-time-it-shows-an-error https://stackoverflow.com/questions/54198108/how-can-i-close-a-window-after-using-turtle https://stackoverflow.com/questions/67734319/running-turtle-multiple-times-but-receiving-a-terminator-error-after-the-first-r https://stackoverflow.com/questions/43294665/turtle-done-not-working-in-spyder https://stackoverflow.com/questions/50438762/python-turtle-window-crashes-every-2nd-time-running https://stackoverflow.com/questions/41644324/how-to-close-python-turtle-properly https://stackoverflow.com/questions/41548813/using-turtle-module-exitonclick/70552164 https://stackoverflow.com/questions/66750634/why-do-i-get-a-terminator-error-when-i-run-this-program https://stackoverflow.com/questions/65546812/python-turtle-terminator https://stackoverflow.com/questions/61963565/why-do-i-keep-getting-a-terminator-error-for-python-turtle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initialising the class variable at the end of the object initialisation method. This will help to run this library smoothly in use cases such as in Jupyter or ipython or spyder or GUI or other cell based execution as well as the usual self contained script or module execution.
Related bugs: https://bugs.python.org/issue26571
Will solve problems highlighted repeatedly in these stack overflow posts (With 1000s of views, current suggestions are some non-elegant work arounds such as importlib.reload(turtle) or or try-except and initializing again in the except as the _RUNNING becomes true at the end of last run or manually setting the _RUNNING flag). More logical to turn this to True after the initialization rather than during terminator exception. Have tested it with various demo cases and examples. No problem found with this update.
https://stackoverflow.com/questions/45534458/python-turtle-terminator-even-after-using-exitonclick
https://stackoverflow.com/questions/34956937/weird-terminator-error-when-running-python-3-turtle-in-os-x
https://stackoverflow.com/questions/70252586/turtle-module-for-langtons-ant-in-python-giving-me-raise-terminator-turtle-ter
https://stackoverflow.com/questions/58078376/a-function-i-created-can-only-be-called-once-second-time-it-shows-an-error
https://stackoverflow.com/questions/54198108/how-can-i-close-a-window-after-using-turtle
https://stackoverflow.com/questions/67734319/running-turtle-multiple-times-but-receiving-a-terminator-error-after-the-first-r
https://stackoverflow.com/questions/43294665/turtle-done-not-working-in-spyder
https://stackoverflow.com/questions/50438762/python-turtle-window-crashes-every-2nd-time-running
https://stackoverflow.com/questions/41644324/how-to-close-python-turtle-properly
https://stackoverflow.com/questions/41548813/using-turtle-module-exitonclick/70552164
https://stackoverflow.com/questions/66750634/why-do-i-get-a-terminator-error-when-i-run-this-program
https://stackoverflow.com/questions/65546812/python-turtle-terminator
https://stackoverflow.com/questions/61963565/why-do-i-keep-getting-a-terminator-error-for-python-turtle
https://bugs.python.org/issue26571