[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Aivar for helpful report. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for suggested docstring Terry. There is related question on StackOverflow: http://stackoverflow.com/questions/4770993/silent-exceptions-in-python-tkinter-should-i-make-them-louder-how -- ___ Python track

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 994a16b51544 by Serhiy Storchaka in branch '2.7': Issue #22384: An exception in Tkinter callback no longer crashes the program https://hg.python.org/cpython/rev/994a16b51544 New changeset c62fad86fac3 by Serhiy Storchaka in branch '3.4': Issue #2238

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: And yes, I am thinking about a broader fix for Idle -- replacing stderr None with something writable. -- ___ Python tracker ___ ___

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since traceback.print_exception already uses print statememts, your patch *is* sufficient to trap the remaining stderr exception. Go ahead. The doctring for report_callback_exception calls it an 'internal function'. To me, that implies 'ignore this' rather th

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Error messages are already silenced if sys.stderr is None or closed. >>> sys.stderr.close() >>> 1/0 >>> >>> sys.stderr = None >>> 1/0 >>> I think that such things as _Errbox are application level solutions. report_callback_exception() is designed to be ov

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: In a pythonw process, stdout and stderr are initially None unless and until changed. (This is something we need to do for the Idle process itself.) Writing to None generates an AttributeError. Uncaught exceptions stop the Python process. The patch works, fo

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be this patch would help. -- assignee: -> serhiy.storchaka keywords: +patch nosy: +serhiy.storchaka stage: -> patch review type: crash -> behavior versions: +Python 2.7, Python 3.5 Added file: http://bugs.python.org/file36600/tkinter_report_call

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-10 Thread Aivar Annamaa
Changes by Aivar Annamaa : -- components: +Tkinter type: -> crash versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list m

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-10 Thread Aivar Annamaa
New submission from Aivar Annamaa: Seems that the statement 'sys.stderr.write("Exception in Tkinter callback\n")' in Tk.report_callback_exception fails when the program is run with pythonw.exe, and brings down the whole process. A simple sample is attached. -- files: demo.py messages: