您好,登錄后才能下訂單哦!
這篇文章主要介紹改python中IDE背景的方法,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
首先,在已經下載好的python文件目錄下,找到config-highlight.def文件,我的是在H:\python\python3**\Lib\idlelib**文件夾下。
打開文件后,你會看到一些默認的顏色配置,比如經典的顏色配置就是白色背景,一般這個文件中會有兩種配置可供選擇:
[IDLE Classic]和 [IDLE New],表現在IDLE界面上就是在python shell下,選擇options—configure IDLE—-highlighting選項中,右側的highlighting theme主題選擇,有兩種可選方案。
如果直接在源文件上修改顏色有些麻煩,除非你特別熟悉顏色。網上有經典的背景配置:
[Obsidian] definition-foreground = #678CB1 error-foreground = #FF0000 string-background = #293134 keyword-foreground = #93C763 normal-foreground = #E0E2E4 comment-background = #293134 hit-foreground = #E0E2E4 builtin-background = #293134 stdout-foreground = #678CB1 cursor-foreground = #E0E2E4 break-background = #293134 comment-foreground = #66747B hilite-background = #2F393C hilite-foreground = #E0E2E4 definition-background = #293134 stderr-background = #293134 hit-background = #000000 console-foreground = #E0E2E4 normal-background = #293134 builtin-foreground = #E0E2E4 stdout-background = #293134 console-background = #293134 stderr-foreground = #FB0000 keyword-background = #293134 string-foreground = #EC7600 break-foreground = #E0E2E4 error-background = #293134 [tango] definition-foreground = #fce94f error-foreground = #fa8072 string-background = #2e3436 keyword-foreground = #8cc4ff normal-foreground = #ffffff comment-background = #2e3436 hit-foreground = #ffffff break-foreground = #000000 builtin-background = #2e3436 stdout-foreground = #eeeeec cursor-foreground = #fce94f hit-background = #2e3436 comment-foreground = #73d216 hilite-background = #edd400 definition-background = #2e3436 stderr-background = #2e3436 break-background = #2e3436 console-foreground = #87ceeb normal-background = #2e3436 builtin-foreground = #ad7fa8 stdout-background = #2e3436 console-background = #2e3436 stderr-foreground = #ff3e40 keyword-background = #2e3436 string-foreground = #e9b96e hilite-foreground = #2e3436 error-background = #2e3436
直接把上面的代碼copy到剛才打開的config-highlight.def文件中,然后重啟shell就可以。
重啟后,shell會默認選擇原來的。你就在highlighting theme主題中查看,此時已經多了兩種主題,就是你剛才添加的。
以上是改python中IDE背景的方法的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。