Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Color-coded syntax in terminal

currently, the terminal I'm using to write my Python code is monochrome gray on black, but this and this example show that you can have color coded syntax as well. I can't identify anything in the default settings which indicates an ability to use color coded syntax in the terminal. I'd like to use a terminal window as a Python interactive shell, so color coded text is a must. How do I do so?

Visual Studio 2015 is so much easier in this regard, but I suppose that is because VSCode isn't an IDE. I just really like having an interactive shell to work with as I test new script.

like image 568
haz Avatar asked Apr 25 '26 06:04

haz


1 Answers

The default console REPL does not have syntax highlighting. However The IDLE IDE that ships with CPython has a syntax-highlighting REPL (interactive shell).

IPython 5 also has syntax highlighting in REPL:

IPython screenshot
(source: jupyter.org)