Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

syntax highlighting in ipython console

Tags:

python

ipython

I am using ipython both in qtconsole and in the terminal

In ipython-qtconsole, when I type import pandas as pd the words have syntax highlighting.

However, when I type in the console, all text is white.

Is it possible to have syntax highlighting in Python console as well?

My ipython versions are:

ipython                    1.2.1
ipython-qtconsole          1.2.1
like image 254
user1968963 Avatar asked Aug 07 '14 19:08

user1968963


People also ask

How do I use IPython console?

The IPython Console allows you to execute commands and interact with data inside IPython interpreters. To launch a new IPython instance, go to New console (default settings) under the Consoles menu, or use the keyboard shortcut Ctrl - T ( Cmd - T on macOS) when the console is focused.

Does Jupyter notebook have syntax highlighting?

Jupyter notebook displays do not use the syntax highlighting theme in Preferences to display code blocks.

What is IPython terminal?

IPython is an interactive command-line terminal for Python. It was created by Fernando Perez in 2001. IPython offers an enhanced read-eval-print loop (REPL) environment particularly well adapted to scientific computing. In other words, IPython is a powerful interface to the Python language.


1 Answers

Jupyter, ipython's spin-off for notebooks, provides the command jupyter console, which is precisely what you (and I) are looking for.

like image 129
Tobias Kienzler Avatar answered Oct 03 '22 19:10

Tobias Kienzler