设置idle样式

idle样式设置1.png

idle样式设置2.png

修改路径为C:\Users\zengziji_dg.idlerc下的,找到这个名叫config-Highlight.cfg文件后接下来就需要编辑它了,有的可能找不到这个文件,那我们就新创新创建一个名为config-Highlight.cfg 的文件。

创建并且添加代码完毕之后,还没结束,现在我们去IDLE中选定我们的主题,这时如果已经打开Python IDLE,保存文件后重启IDLE,开启后依次选择菜单上Options – Configure IDLE…

选择Highlighting选项卡,然后Select选择a Custom Theme,如下图所示,选择刚才配置的两个主题之一,我这里选择zengziji_type。

config-highlight.cfg内容为:
[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