python
python copied to clipboard
Using with IPython 9.x
The release of IPython 9.0.0 came with a rewrite to the theming, and deprecates the c.TerminalInteractiveShell.highlighting_style setting. I don't quite understand how to customise the new theming yet, but it would be good to work this out and update the README. If anyone has any solutions, I'd very much appreciate it.
Hey, I stumbled upon this answer which I think solved it. Here's what worked for me:
from IPython.utils.PyColorize import linux_theme, theme_table
from copy import deepcopy
theme = deepcopy(linux_theme)
# Choose catppuccin theme
catppuccin_theme = "catppuccin-mocha"
# catppuccin_theme = "catppuccin-macchiato"
# catppuccin_theme = "catppuccin-frappe"
# catppuccin_theme = "catppuccin-latte"
theme.base = catppuccin_theme
theme_table[catppuccin_theme] = theme
c = get_config()
c.TerminalInteractiveShell.true_color = True
c.TerminalInteractiveShell.colors = catppuccin_theme
works here, thank you bro