3

python Repl

Vim

As we can see the difference between the images. In vim datatype and function are of different color. How can i bring color to my python repl.

I want to do it by myself. Please suggest me, how should I do this. Whether I should have to do something with stdout stream object or I have to change something in python interpreter and then build it from source (ohh I have to compile the python from source only to bring this change)

Sorry if there is some error in my question. Hopes you all will understand me.

  • 1
    Take a look at [bpython](https://bpython-interpreter.org/), which does almost exactly that. You can take a look at the source to see how they do it (they also provide a list of similar [alternatives](https://bpython-interpreter.org/alternatives.html)). – larsks Jan 21 '21 at 13:45
  • Thanks @larsks. I will check it out. – Prince Roshan Jan 21 '21 at 14:34
  • Does this answer your question? [Change Python interactive prompt ">>>"](https://stackoverflow.com/questions/33683744/change-python-interactive-prompt) – not2qubit Dec 28 '21 at 23:23

1 Answers1

1

You should probably have searched a little bit more first, because there are many answers here about this. Perhaps the best ones are:

not2qubit
  • 14,531
  • 8
  • 95
  • 135