重点敲黑板:
C:\Users\xuzhen.ipython\profile_default
ipython profile create
产生的ipython_config文件是在这里,而不是你想要改变的环境的目录!天坑
默认的字体颜色都不行,暗红色字体在黑色背景下根本看不清
问题定义
我在Windows Powershell上使用IPython。 由于某种原因,字符串文字的颜色是深红色,难以理解:
为了进行比较,这是使用powershell“ shell”和Ipython在VSCode上的外观:
题
IPython当然使用一些命令来告诉外壳要使用的颜色。 如何将字符串文字颜色修改为浅红色? 我希望这是计算机范围(或至少用户范围)的设置。powershellipython
3 个回复
===============>>#1 票数:3
这是我为使文本更具可读性所做的工作。 感谢SO用户Theo和Christoph为我指出了正确的方向。
1.检查~\\.ipython
没有任何配置文件
- 在Windows上
~
转换为C:\\Users\\<USER>\\
。
2.跑ipython profile create
- 输出是
PS C:\Somefolder> ipython profile create
[ProfileCreate] Generating default config file: 'C:\\Users\\<USER>\\.ipython\\profile_default\\ipython_config.py'
3.编辑了ipython_config.py
- 编辑了以下行:
#c.TerminalInteractiveShell.highlighting_style_overrides = {}
进入
from pygments.token import Token
c.TerminalInteractiveShell.highlighting_style_overrides = {Token.String: '#ff0000'}