python怎么改背景_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知識請關注Python視頻教程欄目。
總結
以上是生活随笔為你收集整理的python怎么改背景_python IDE背景怎么改的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PC新黑马杀出来了:华为笔记本销量大增4
- 下一篇: python语言中百分号是什么意思_Py