[issue25313] IDLE: gracefully handle themes (or keysets, or ...) not present

Mark Roseman report at bugs.python.org
Sun Oct 4 14:56:39 EDT 2015


Mark Roseman added the comment:

Actually, I think we may be able to get away without the warning message when you select a 'new' theme, and still maintain backwards compatibility.

For 'new' themes (i.e. IDLE Dark and any more builtins we add in the future), we write the theme out to the user configuration file, keeping the same name, and perhaps adding an extra field, i.e. 'builtin=1', so that we can recognize it in newer versions, along with a comment if possible.

The existing code looks up theme names by checking if its in the default list, and if not, looks in the user list. For older versions without IDLE Dark, it will then find it in the user list.

Besides writing out the theme to user config file, the only other change that would be needed in the code is to modify GetSectionList so that when it's looking in a user config file, it doesn't include sections that either have the builtin=1 from above, or just have the same name as things in the default file.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25313>
_______________________________________


More information about the Python-bugs-list mailing list