Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to turn on python syntax highlighting for on Mac OS X?

share|improve this question
Do you mean inside the Python read-eval-print interpreter? – Lawrence Velázquez Mar 31 '10 at 5:38

3 Answers 3

Here is a series of screencasts, that shows bpython in action:

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Diogo Aug 9 '12 at 12:45
@Diogo, visiting the site will show that this link is to how-to videos. It's difficult to include essential parts in that respect. I agree that the answer needs work, but I don't think your comment is helpful. – user3463 Aug 12 '12 at 5:41
No problem Randolph, this comment was automatically posted by the review system when I reviewed it. – Diogo Aug 12 '12 at 14:19

Try ipython. It highlights syntax and much more.
I haven't tried it on Mac but looks like it must work:

Another option is WxPython and pycrust (which works without :( )

share|improve this answer

If you just want to highlight sources you dump into the terminal a la cat try excellent pygments. It actually supports a lot of languages. Run with


If instead you were talking about editing files with syntax highlighting inside a mac terminal, this really depends on the editor.

  • for vi or vim you want at least these option in ~/.vimrc

    syntax on
  • emacs works right out of the box

  • don't ask me about nano.
share|improve this answer
include "/usr/share/nano/python.nanorc" - quite good. – grawity Mar 31 '10 at 18:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.