Mark Roseman added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17397>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to