Issue
I updated iPython to:
Python 3.6.7 (default, Mar 29 2019, 10:38:28)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help.
What I noticed is that double underscore attribute likes __name__
have dark blue color. My terminal is black, so those attributes are ridiculously dark and hard to see (look at A.__name__
):
Is there a way to modify colors on iPython?..
I found this question, but it seems with 7.4.0
iPython, given answers no longer work.
How do I customize text color in IPython?
Solution
Looking in your installation directory you will find a file called ipython_config.py
. To install this file, simply use the following command:
ipython profile create
Otherwise find this file and copy it in your ~/.ipython/profile_default/
directory.
Before editing it, make a backup of this file with:
cp ~/.ipython/profile_default/ipython_config.py \
~/.ipython/profile_default/ipython_config.py_backup
Open this file with your editor of choice, search for following setting and comment it out (delete the '#'):
#c.TerminalInteractiveShell.highlighting_style_overrides = {}
you must have next code there:
## Override highlighting format for specific tokens
from pygments.token import Name
c.TerminalInteractiveShell.highlighting_style_overrides = {
Name.Variable: "#FF00FF"
}
Answered By - kriboco
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.