Terminal 如何在IPython shell上更改iTerm2的颜色?

Terminal 如何在IPython shell上更改iTerm2的颜色?,terminal,ipython,iterm2,Terminal,Ipython,Iterm2,我想在iTerm2上更改IPython外壳的颜色,但尽管我可以更改iTerm2的颜色,但我无法更改IPython外壳的内容 iTerm2颜色可以从Preferences | Profiles |窗口更改,但我选择的任何颜色方案都不会更改IPython外壳的颜色,例如import或try关键字 所以我认为这是在其他地方决定的。如何更改IPython外壳的颜色?通过更改它。我将以下内容设置为我的ipython\u config.py: c.InteractiveShell.colors = "Lin

我想在iTerm2上更改IPython外壳的颜色,但尽管我可以更改iTerm2的颜色,但我无法更改IPython外壳的内容

iTerm2颜色可以从Preferences | Profiles |窗口更改,但我选择的任何颜色方案都不会更改IPython外壳的颜色,例如
import
try
关键字

所以我认为这是在其他地方决定的。如何更改IPython外壳的颜色?

通过更改它。我将以下内容设置为我的
ipython\u config.py

c.InteractiveShell.colors = "Linux"
c.TerminalInteractiveShell.highlighting_style = "vim"
TerminalInteractiveShell.highlighting_style
的可用颜色可通过以下代码获得:

import pygments
list(pygments.styles.get_all_styles())

有一种魔力,
%colors
,它可能会做你想做的事情want@gboffi这是否只支持三种颜色,Linux、NoColor和LightBG,对吗?在我看来他们都很糟糕。。。(例如,
import
几乎可见)。右。两种配色方案,没有颜色,仅此而已,对不起。我使用浅色背景,而IPython坚持使用非常明亮的颜色,直到我发现
%colors LightBg
命令大大改善了我的情况,我希望你也能这样…@gboffi我发现
TerminalInteractiveShell
有更多的选项可用。如果你有兴趣,请检查我的答案。我有兴趣。。。谢谢你,再见