溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

改python中IDE背景的方法

發(fā)布時(shí)間:2020-07-15 17:20:38 來源:億速云 閱讀:153 作者:清晨 欄目:編程語言

這篇文章主要介紹改python中IDE背景的方法,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

首先,在已經(jīng)下載好的python文件目錄下,找到config-highlight.def文件,我的是在H:\python\python3**\Lib\idlelib**文件夾下。 

打開文件后,你會(huì)看到一些默認(rèn)的顏色配置,比如經(jīng)典的顏色配置就是白色背景,一般這個(gè)文件中會(huì)有兩種配置可供選擇: 
[IDLE Classic]和 [IDLE New],表現(xiàn)在IDLE界面上就是在python shell下,選擇options—configure IDLE—-highlighting選項(xiàng)中,右側(cè)的highlighting theme主題選擇,有兩種可選方案。

如果直接在源文件上修改顏色有些麻煩,除非你特別熟悉顏色。網(wǎng)上有經(jīng)典的背景配置:

[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會(huì)默認(rèn)選擇原來的。你就在highlighting theme主題中查看,此時(shí)已經(jīng)多了兩種主題,就是你剛才添加的。

改python中IDE背景的方法

以上是改python中IDE背景的方法的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI