python编辑器背景设置为黑色_如何更换python默认编辑器的背景色

如何更换python默认编辑器的背景色,颜色,文件,路径,主题,背景

如何更换python默认编辑器的背景色

易采站长站,站长之家为您整理了如何更换python默认编辑器的背景色的相关内容。

初学Python,想必大家拿来练习最多的IDE就是Python自带的IDLE了,但是默认的代码配色及语法高亮主题确实很不适应。下面我们就来看一下修改python默认编辑器背景颜色的方法。

1、首先要找到名为config-highlight.cfg的文件

在Linux系列系统下路径为(~表示用户目录):~/.idlerc/

在Windows XP下路径为:C:\Documents and Settings\\.idlerc\

在Windows 7下路径为:C:\Users\\.idlerc\

对于Windows可以直接打开开始运行或者在地址栏输入下面的路径确认即可:

%USERPROFILE%\.idlerc\找到这个名叫config-highlight.cfg文件后接下来就需要编辑它了

打开文件后,你会看到一些默认的颜色配置,比如经典的颜色配置就是白色背景,一般这个文件中会有两种配置可供选择:

[IDLE Classic]和[IDLE New]

表现在IDLE界面上就是在python shell下,选择options—configure IDLE—-highlighting选项中,右侧的highlighting theme主题选择。

如果直接在源文件上修改颜色有些麻烦,除非你特别熟悉颜色。网上有经典的背景配置:[Obsidian]definition-foreground = #678CB1error-foreground = #FF0000string-background = #293134keyword-foreground = #93C763normal-foreground = #E0E2E4comment-background = #293134hit-foreground = #E0E2E4builtin-background = #293134stdout-foreground = #678CB1cursor-foreground = #E0E2E4break-background = #293134comment-foreground = #66747Bhilite-background = #2F393Chilite-foreground = #E0E2E4definition-background = #293134stderr-background = #293134hit-background = #000000console-foreground = #E0E2E4normal-background = #293134builtin-foreground = #E0E2E4stdout-background = #293134console-background = #293134stderr-foreground = #FB0000keyword-background = #293134string-foreground = #EC7600break-foreground = #E0E2E4error-background = #293134[tango]definition-foreground = #fce94ferror-foreground = #fa8072string-background = #2e3436keyword-foreground = #8cc4ffnormal-foreground = #ffffffcomment-background = #2e3436hit-foreground = #ffffffbreak-foreground = #000000builtin-background = #2e3436stdout-foreground = #eeeeeccursor-foreground = #fce94fhit-background = #2e3436comment-foreground = #73d216hilite-background = #edd400definition-background = #2e3436stderr-background = #2e3436break-background = #2e3436console-foreground = #87ceebnormal-background = #2e3436builtin-foreground = #ad7fa8stdout-background = #2e3436console-background = #2e3436stderr-foreground = #ff3e40keyword-background = #2e3436string-foreground = #e9b96ehilite-foreground = #2e3436error-background = #2e3436

直接把上面的代码copy到刚才打开的config-highlight.def文件中,然后重启shell就可以。

重启后,shell会默认选择原来的。你就在highlighting theme主题中查看,此时已经多了两种主题,就是你刚才添加的。

以上就是关于对如何更换python默认编辑器的背景色的详细介绍。欢迎大家对如何更换python默认编辑器的背景色内容提出宝贵意见

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值