I am using ipython
both in qtconsole
and in the terminal
In ipython-qtconsole
, when I type import pandas as pd
the
Yes, if you use IPython 5.0 or above, It makes uses of Python Prompt Toolkit which does highlight code as you type, as well as support real, and sane multi-line edition.
To upgrade use :
pip install ipython --upgrade
This is based on the work of Jonathan Slenders on ptpython:
python -m pip install ptpython
which provide 2 commands: ptpython
and ptipython
which should syntax highlight in your terminal. ptipython
is a proof of concept so will likely miss some functionality of IPython, but push the interface a bit further.
Note that jupyter-console, which can connect to IPython as a kernel will also make use of prompt toolkit and highlight code as you type.
Jupyter, ipython
's spin-off for notebooks, provides the command jupyter console
, which is precisely what you (and I) are looking for.