python IDLE 背景以及字体大小的修改方法


Posted in Python onJuly 12, 2019

为了保护眼睛,决定把白色背景换掉:

1 首先,在已经下载好的python文件目录下,找到config-highlight.def文件,我的是在H:\python\python3**\Lib\idlelib**文件夹下。

2.打开文件后,你会看到一些默认的颜色配置,比如经典的颜色配置就是白色背景,一般这个文件中会有两种配置可供选择:
[IDLE Classic]和 [IDLE New],表现在IDLE界面上就是在python shell下,选择options—configure IDLE—-highlighting选项中,右侧的highlighting theme主题选择,有两种可选方案,就上文件中的那两种。

3.如果直接在源文件上修改颜色有些麻烦,除非你特别熟悉颜色。网上有经典的背景配置:

[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 IDLE 背景以及字体大小的修改方法

主题名字为tango..

大功告成。。

字体的修改

在setting中,如果你设置的字体是中文字体,再怎么修改大小也是没有用的。必须把字体改为英文字体才行。。

python IDLE 背景以及字体大小的修改方法

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持三水点靠木。

Python 相关文章推荐
Python greenlet实现原理和使用示例
Sep 24 Python
轻松掌握python设计模式之策略模式
Nov 18 Python
使用selenium模拟登录解决滑块验证问题的实现
May 10 Python
pytorch查看torch.Tensor和model是否在CUDA上的实例
Jan 03 Python
opencv中图像叠加/图像融合/按位操作的实现
Apr 01 Python
Django项目uwsgi+Nginx保姆级部署教程实现
Apr 19 Python
Python Selenium截图功能实现代码
Apr 26 Python
python logging.info在终端没输出的解决
May 12 Python
Python图像阈值化处理及算法比对实例解析
Jun 19 Python
Tensorflow与Keras自适应使用显存方式
Jun 22 Python
python实现图片转字符画
Feb 19 Python
在Windows下安装配置CPU版的PyTorch的方法
Apr 02 Python
Python-Tkinter Text输入内容在界面显示的实例
Jul 12 #Python
Python爬虫抓取技术的一些经验
Jul 12 #Python
python 使用装饰器并记录log的示例代码
Jul 12 #Python
如何使用python爬虫爬取要登陆的网站
Jul 12 #Python
Pycharm使用之设置代码字体大小和颜色主题的教程
Jul 12 #Python
python增加图像对比度的方法
Jul 12 #Python
Python 控制终端输出文字的实例
Jul 12 #Python
You might like
discuz安全提问算法
2007/06/06 PHP
Eclipse中php插件安装及Xdebug配置的使用详解
2013/04/25 PHP
php生成EAN_13标准条形码实例
2013/11/13 PHP
fckeditor 获取文本框值的实现代码
2009/02/09 Javascript
JavaScript中的无阻塞加载性能优化方案
2014/10/10 Javascript
canvas雪花效果核心代码分享
2017/02/19 Javascript
xmlplus组件设计系列之下拉刷新(PullRefresh)(6)
2017/05/03 Javascript
详解vue-cli之webpack3构建全面提速优化
2017/12/25 Javascript
JavaScript判断变量名是否存在数组中的实例
2017/12/28 Javascript
jQuery创建及操作xml格式数据示例
2018/05/26 jQuery
vue cli3 调用百度翻译API翻译页面的实现示例
2019/09/13 Javascript
详解Angular Karma测试的持续集成实践
2019/11/15 Javascript
ckeditor一键排版功能实现方法分析
2020/02/06 Javascript
JavaScript监听键盘事件代码实现
2020/06/03 Javascript
vue中destroyed方法的使用说明
2020/07/21 Javascript
JavaScript代码实现微博批量取消关注功能
2021/02/05 Javascript
[02:51]2018年度DOTA2最佳中单位选手-完美盛典
2018/12/17 DOTA
[50:48]LGD vs CHAOS 2019国际邀请赛小组赛 BO2 第二场 8.15
2019/08/16 DOTA
Python深入学习之上下文管理器
2014/08/31 Python
python使用Image处理图片常用技巧分析
2015/06/01 Python
Python获取命令实时输出-原样彩色输出并返回输出结果的示例
2019/07/11 Python
Python 通过截图匹配原图中的位置(opencv)实例
2019/08/27 Python
wxPython之wx.DC绘制形状
2019/11/19 Python
Python3爬虫中Selenium的用法详解
2020/07/10 Python
python开发入门——set的使用
2020/09/03 Python
python3代码输出嵌套式对象实例详解
2020/12/03 Python
Holiday Inn中国官网:IHG旗下假日酒店预订
2018/04/08 全球购物
AVI-8手表美国官方商店:AVI-8 USA
2019/04/10 全球购物
为什么要用EJB
2014/04/17 面试题
经管应届生求职信
2013/11/17 职场文书
银行领导证婚词
2014/01/11 职场文书
前台文员职责范本
2014/03/07 职场文书
英语导游词
2015/02/13 职场文书
《叶问2》观后感
2015/06/15 职场文书
2016年毕业实习心得体会范文
2015/10/09 职场文书
win10怎么设置右下角图标不折叠?Win10设置右下角图标不折叠的方法
2022/07/15 数码科技