Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just modified my .bash_profile so as to have colors in iTerm and Terminal.

Now, I want to enable syntax highlighting for the Python interactive shell, IDLE-style.

How to do that?

share|improve this question
up vote 15 down vote accepted

bpython appears to do what you want.

bpython is a fancy interface to the Python interpreter for Linux, BSD, OS X and Windows (with some work). bpython is released under the MIT License. It has the following (special) features:

enter image description here

  • In-line syntax highlighting
  • Readline-like autocomplete with suggestions displayed as you type
  • Expected parameter list for any Python function
  • Send the code you've entered off to a pastebin
  • Auto-indentation
    And more

Alternatives are IPython or DreamPie

share|improve this answer
1  
Or ipython. Both are fancier alternatives than the vanilla python interpreter. – vtest Dec 4 '11 at 13:26
1  
@vtest I now added syntax highlighting feature to the ipython features list in the wiki table. Thank you. – user89272 Dec 4 '11 at 22:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .