Python background color and syntax highlighting theme configuration

Source: Internet
Author: User
Tags builtin

People who use Python idle may not be able to tolerate the default white background and its syntax highlighting theme.

People are more inclined to use a black background.

The. Idlerc directory for the user directory:

The following systems correspond to the location of the file: Under the Linux Series system path is (~ means user directory):~/.idlerc/ under Windows XP path is: C:/documents and settings/< User name >/.idlerc/ under Windows 7, the path is: C:/users/< user name >/.idlerc/
under Window, you can enter the following path directly in the Run box to locate the location:%userprofile%/.idlerc/ Sometimes you find that there is no config in the directory- for LINUXVI ~/.idlerc/config-%userprofile%/.idlerc/config-highlight.cfg

Here are obsidian, Desert, and Tango three theme configurations

In the user directory, under the. Idlerc directory, create a new name for the Config-highlight.cfg file and add the following

[Tango]definition-foreground =#fce94ferror-foreground =#fa8072string-background =#2e3436keyword-foreground =#8cc4ffnormal-foreground =#ffffffcomment-background =#2e3436hit-foreground =#ffffff Break-foreground = #000000Builtin-background =#2e3436stdout-foreground =#eeeeeccursor-foreground =#fce94fhit-background =#2e3436comment-foreground =#73d216hilite-background =#edd400definition-background =#2e3436stderr-background =#2e3436 Break-background =#2e3436console-foreground =#87ceebnormal-background =#2e3436builtin-foreground =#ad7fa8stdout-background =#2e3436console-background =#2e3436stderr-foreground =#ff3e40keyword-background =#2e3436string-foreground =#e9b96ehilite-foreground =#2e3436error-background =#2e3436 [Desert]definition-foreground =#98fb98error-foreground =#ff0000string-background = #333333keyword-foreground =#cc6600normal-foreground =#f0e68ccomment-background = #333333 Hit-foreground =#ffffff Break-foreground =Blackbuiltin-background = #333333stdout-foreground =#eeeeeecursor-foreground =#ffcc00hit-background = #333333Comment-foreground =#87ceebhilite-background =graydefinition-background = #333333stderr-background = #333333 Break-background =#ffff55console-foreground =#87ceebnormal-background = #333333Builtin-foreground =#519e51stdout-background = #333333Console-background = #333333stderr-foreground =#ff3e40keyword-background = #333333string-foreground =#ffa0a0hilite-foreground = #000000Error-background = #000000[Obsidian]definition-foreground =#678CB1error-foreground =#FF0000string-background = #293134keyword-foreground =#93C763normal-foreground =#E0E2E4comment-background = #293134 Hit-foreground =#E0E2E4builtin-background = #293134stdout-foreground =#678CB1cursor-foreground =#E0E2E4 Break-background = #293134Comment-foreground =#66747Bhilite-background =#2F393Chilite-foreground =#E0E2E4definition-background = #293134stderr-background = #293134 Hit-background = #000000Console-foreground =#E0E2E4normal-background = #293134Builtin-foreground =#E0E2E4stdout-background = #293134Console-background = #293134stderr-foreground =#FB0000keyword-background = #293134string-foreground =#EC7600 Break-foreground =#E0E2E4error-background = #293134

重启IDLE,依次选 Options -> Configure IDLE -> Highlighting 如

Have children's shoes to ask how to configure the font? This is easy, there is a fonts/tabs tab next to the Highlighting tab that you can use to configure the font and indent width:

Python background color and syntax highlighting theme configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.