This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author markroseman
Recipients Arfrever, gpolo, klappnase, markroseman, serhiy.storchaka, terry.reedy
Date 2015-08-07.20:09:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1438978187.16.0.37604805835.issue17397@psf.upfronthosting.co.za>
In-reply-to
Content
I believe the ttk::themes call is older, part of when it was still Tile. There are a bunch of those kind of API's that were kept around (for compatibility I presume) when the official API (style theme names) was created and documented.

As explained on the original mailing list thread, the difference has to do with Tcl's lazy loading of packages (i.e. it knows what package to load when you need a particular command, but will not necessarily load it until the command is used)
    http://code.activestate.com/lists/python-tkinter-discuss/3371/

To summarize, even now you can install themes and use them, they just won't appear in the list until they're used.

Because calls like ttk::themes are *not* part of the official, documented API, I would strongly suggest not adding a separate API in tkinter; instead, stay with Style.theme_names

I would suggest that the default behaviour of theme_names be changed to call ttk::themes (falling back on theme use if it generates an error). I would also suggest adding a tkinter-only optional keyword parameter to this call (e.g. loaded, defaulting to False; if True is would call 'ttk::style theme names'). Then document that loaded=True is not guaranteed to be only loaded ones in future, because I wouldn't be surprised if Tk changes this at some point.
History
Date User Action Args
2015-08-07 20:09:47markrosemansetrecipients: + markroseman, terry.reedy, klappnase, gpolo, Arfrever, serhiy.storchaka
2015-08-07 20:09:47markrosemansetmessageid: <1438978187.16.0.37604805835.issue17397@psf.upfronthosting.co.za>
2015-08-07 20:09:47markrosemanlinkissue17397 messages
2015-08-07 20:09:46markrosemancreate