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处理python编码问题
Mar 13 Python
python 写的一个爬虫程序源码
Feb 28 Python
Python如何实现守护进程的方法示例
Feb 08 Python
Python实现一个简单的验证码程序
Nov 03 Python
详解如何在Apache中运行Python WSGI应用
Jan 02 Python
Python字符串的全排列算法实例详解
Jan 07 Python
Python基于datetime或time模块分别获取当前时间戳的方法实例
Feb 19 Python
Python开发网站目录扫描器的实现
Feb 21 Python
Python3.5内置模块之shelve模块、xml模块、configparser模块、hashlib、hmac模块用法分析
Apr 27 Python
用Python从0开始实现一个中文拼音输入法的思路详解
Jul 20 Python
Python工程师必考的6个经典面试题
Jun 28 Python
python3.9和pycharm的安装教程并创建简单项目的步骤
Feb 03 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
腾讯QQ微博API接口获取微博内容
2013/10/30 PHP
从零开始学YII2框架(三)扩展插件yii2-gird
2014/08/20 PHP
php ImageMagick windows下安装教程
2015/01/26 PHP
完美解决在ThinkPHP控制器中命名空间的问题
2017/05/05 PHP
Ext第一周 史上最强学习笔记---GridPanel(基础篇)
2008/12/29 Javascript
JavaScript中函数表达式和函数声明及函数声明与函数表达式的不同
2015/11/15 Javascript
Node.js DES加密的简单实现
2016/07/07 Javascript
JS原生带小白点轮播图实例讲解
2017/07/22 Javascript
微信小程序中button组件的边框设置的实例详解
2017/09/27 Javascript
浅谈Angular单元测试总结
2019/03/22 Javascript
小程序实现锚点滑动效果
2019/09/23 Javascript
爬山算法简介和Python实现实例
2014/04/26 Python
python实现通过代理服务器访问远程url的方法
2015/04/29 Python
Python中列表和元组的使用方法和区别详解
2020/12/30 Python
简单易懂的python环境安装教程
2017/07/13 Python
python爬虫 urllib模块url编码处理详解
2019/08/20 Python
Centos7 下安装最新的python3.8
2019/10/28 Python
python3中关于excel追加写入格式被覆盖问题(实例代码)
2020/01/10 Python
TensorFlow tensor的拼接实例
2020/01/19 Python
Python使用requests xpath 并开启多线程爬取西刺代理ip实例
2020/03/06 Python
详解Tensorflow不同版本要求与CUDA及CUDNN版本对应关系
2020/08/04 Python
html table呈现个人简历以及单元格宽度失效的问题解决
2021/01/22 HTML / CSS
戴尔马来西亚官网:Dell Malaysia
2020/05/02 全球购物
关联、聚合(Aggregation)以及组合(Composition)的区别
2012/02/29 面试题
星空联盟C# .net笔试题
2014/12/05 面试题
如何提高MySql的安全性
2014/06/19 面试题
UNIX特点都有哪些
2016/04/05 面试题
校园联欢晚会主持词
2014/03/17 职场文书
目标责任书格式
2014/07/28 职场文书
2014年公务员个人工作总结
2014/11/22 职场文书
优秀教育工作者事迹材料
2014/12/24 职场文书
商务英语求职信范文
2015/03/19 职场文书
团日活动总结格式
2015/05/11 职场文书
西柏坡观后感
2015/06/08 职场文书
详细聊聊浏览器是如何看闭包的
2021/11/11 Javascript
浅谈如何保证Mysql主从一致
2022/03/13 MySQL