[issue24759] Idle: require 8.5 / ttk
Serhiy Storchaka added the comment: IMHO Tcl and Tk should be in title case (as Python or Django) or at least all in upper case (as APL or SDL). -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24759] Idle: require 8.5 / ttk
Serhiy Storchaka added the comment: I don't see any mentions of ttk in IDLE source code except added check. Is ttk really required for IDLE? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24759] Idle: require 8.5 / ttk
Terry J. Reedy added the comment: Re-opened for tweak. This patch, to exit gracefully if ttk is not available, is the first step before using ttk in Idle. Mark, a long-time tk/ttk expert and site/book author, has volunteered to help upgrade Idle with ttk. Please see ttk in idle on Idle-Sig list for general discussion and #24750 for the first substantive patches. The only reason I have not applied the ttk.Scrollbar patch, on that issue, is because Ned mentioned, on that issue, that the OS 8.5 python requires tcl/tk 8.4. I strongly feel that this should not stop the use of ttk, but I an first doing a few non-ttk patches, including Mark's patch for #24745, before continuing. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24759] Idle: require 8.5 / ttk
Terry J. Reedy added the comment: I tested by renaming installed 3.5 ttk, editing 3.5 PyShell with 3.4, and clicking 3.5 icon. -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24759] Idle: require 8.5 / ttk
Mark Roseman added the comment: Sounds good. Only suggestion, given it's user facing, is to have the error message point them towards a solution. Off the top of my head, maybe something like IDLE requires Python be configured to use Tk 8.5 or newer (you have Tk x.x) with a title of IDLE Cannot be Started -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24759] Idle: require 8.5 / ttk
New submission from Terry J. Reedy: PyShell currently has this code try: from tkinter import * except ImportError: print(** IDLE can't import Tkinter.\n Your Python may not be configured for Tk. **, file=sys.__stderr__) sys.exit(1) import tkinter.messagebox as tkMessageBox When Idle is started from an icon, there is no place for the error message to go, so it appears than nothing happens. But this is the best we can do without invoking system specific error message functions. (This, if possible, would be another issue.) The second import assumes that messagebox is available, which is should be without modification of the tkinter package since long ago. But I think we should guard against someone trying to start Idle on pre 8.5. The following seems to work nicely. This is a prerequisite for any ttk patches. Any comment before I apply? try: from tkinter import ttk except: root = Tk() root.withdraw() tkMessageBox.showerror(Fatal Idle Import Error, Idle cannot import required module tkinter.ttk.\n Click OK to exit., parent=root) sys.exit(1) -- assignee: terry.reedy messages: 247701 nosy: markroseman, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Idle: require 8.5 / ttk type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24759] Idle: require 8.5 / ttk
Terry J. Reedy added the comment: Improved message. Thanks. Should be good enough for the extremely few times it should ever be triggered. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24759] Idle: require 8.5 / ttk
Roundup Robot added the comment: New changeset 8203fc75b3d2 by Terry Jan Reedy in branch '2.7': Issue 24759: Gracefull exit Idle if ttk import fails. https://hg.python.org/cpython/rev/8203fc75b3d2 New changeset 13a8782a775e by Terry Jan Reedy in branch '3.4': Issue 24759: Gracefull exit Idle if ttk import fails. https://hg.python.org/cpython/rev/13a8782a775e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24759 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com