修改路徑為C:\Users\zengziji_dg.idlerc下的髓废,找到這個(gè)名叫config-Highlight.cfg文件后接下來就需要編輯它了贫橙,有的可能找不到這個(gè)文件遂跟,那我們就新創(chuàng)新創(chuàng)建一個(gè)名為config-Highlight.cfg 的文件衔掸。
創(chuàng)建并且添加代碼完畢之后,還沒結(jié)束妆棒,現(xiàn)在我們?nèi)DLE中選定我們的主題澡腾,這時(shí)如果已經(jīng)打開Python IDLE,保存文件后重啟IDLE糕珊,開啟后依次選擇菜單上Options – Configure IDLE…
選擇Highlighting選項(xiàng)卡动分,然后Select選擇a Custom Theme,如下圖所示红选,選擇剛才配置的兩個(gè)主題之一澜公,我這里選擇zengziji_type。
config-highlight.cfg內(nèi)容為:
[zengziji_type]
normal-background = #000000
error-foreground = #ffff00
stdout-foreground = blue
normal-foreground = #c0c0c0
console-foreground = #ffffff
console-background = #000000
builtin-background = #000000
string-foreground = #ffff95
stdout-background = #000000
break-background = #000000
definition-foreground = #0080c0
hilite-background = #000000
break-foreground = #ffffff
builtin-foreground = #ff80ff
hit-foreground = #ffffff
error-background = #000000
hilite-foreground = #ffff80
keyword-background = #000000
stderr-foreground = #ff0000
comment-background = #000000
cursor-foreground = #ffffff
string-background = #000000
hit-background = #000000
definition-background = #000000
keyword-foreground = #8080ff
stderr-background = #c0c0c0
comment-foreground = #808080