Search code examples
python-idle

Python IDLE change highlighting theme


I am using a Mac and I have no idea how I can change the highlighing theme in Python IDLE (Python's Integrated Development Environment).

I want to change it to the following colors:

> https://pastebin.com/54h6U91Q

Sublime Text theme colors.

Any help? Thanks a lot!


Solution

  • Make sure all IDLE instances are closed, then in your home folder (~) there should be a 'hidden' folder called .idlerc - if it doesn't exist, create it.

    In that folder edit or create a file named config-highlight.cfg add to it:

    [SublimeText]
    

    and paste your colors after it (from the quick glance it seems to match IDLEs color scheme config). Then edit/create a file named config-main.cfg and make sure it has its theme section as:

    [Theme]
    default = 0
    name = SublimeText