[issue16582] Tkinter calls SystemExit with string
Roundup Robot added the comment: New changeset fed68e0bce53 by Andrew Svetlov in branch '3.2': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/fed68e0bce53 New changeset e39677feabe0 by Andrew Svetlov in branch '3.3': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/e39677feabe0 New changeset 5ad5efc847c7 by Andrew Svetlov in branch 'default': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/5ad5efc847c7 New changeset 37c1d20facd7 by Andrew Svetlov in branch '2.7': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/37c1d20facd7 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16582] Tkinter calls SystemExit with string
Andrew Svetlov added the comment: Fixed. Thanks. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16582] Tkinter calls SystemExit with string
Andrew Svetlov added the comment: Thanks for report. The patch is really trivial, but I don't sure if it can be applied to released python versions. -- keywords: +patch nosy: +asvetlov Added file: http://bugs.python.org/file28198/issue16582.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16582] Tkinter calls SystemExit with string
Serhiy Storchaka added the comment: The code was changed in the changeset e8a2a5e4c7b0. def _exit(code='0'): - import sys - sys.exit(getint(code)) + raise SystemExit, code I think it is a bug and should be fixed. -- nosy: +gvanrossum, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16582] Tkinter calls SystemExit with string
Abraham Karplus added the comment: I'd be fine with having it fixed just in 3.4, as it is easy enough to work around for now. (Call deletecommand('exit') and then createcommand('exit', working_exit_function) with working_exit function being the patched version of _exit.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16582] Tkinter calls SystemExit with string
New submission from Abraham Karplus: Exiting a Tkinter application normally results in printing '0' and exiting with error code 1. This is a result of Tkinter's _exit function, whose default argument for code is the string '0'. It then calls SystemExit with the code argument. However, according to the SystemExit documentation if [the argument] has another type (such as a string), the object’s value is printed and the exit status is one. A simple fix for this would be to change the Tkinter _exit function to convert code to an int before passing it to SystemExit. -- components: Tkinter messages: 176696 nosy: Abraham Karplus priority: normal severity: normal status: open title: Tkinter calls SystemExit with string type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16582] Tkinter calls SystemExit with string
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +gpolo versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com