New submission from Terry J. Reedy: The patch adds a main function with the minimum needed to start the mainloop. It omits the 'while RUN' loop and development code for catching exceptions while running. They should never happen, and silently suppressing tracebacks is a bad idea.
The patch also deletes the unneeded sys.exit() call from _destroy. In 3.x debug builds, this call results in the following clipped warning being printed in the startup console. while executing "46111032_destroy" (command for "WM_DELETE_WINDOW" window manager protocol) These no longer occur when sys.exit() is removed. Turtledemo works fine with these changes. ---------- assignee: terry.reedy files: turdemo_start_stop.diff keywords: patch messages: 223780 nosy: terry.reedy priority: normal severity: normal stage: commit review status: open title: turtledemo: clean up start and stop, fix warning type: behavior versions: Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file36051/turdemo_start_stop.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22053> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com