[IPython-dev] Using pygments for coloring in IPython

Brian Granger ellisonbg.net at gmail.com
Wed Jul 1 23:58:27 EDT 2009


Hi,

Currently in IPython we have custom code for coloring things (python source
code, tracebacks, etc.).  There are a number of disadvantages  with this:

* We can only color python source code.  It would be nice if pycat could
color other languages.
* We can only color to the terminal.  As we develop non-terminal based
IPython's, it would be very nice to be able to color to html or other forms.
* Currently, we are the ones who get to maintain all this custom parsing and
coloring code.

These days pygments is getting a ton of use and attention because (amongst
others) of its use by Sphinx.  What about using pygments to color everything
in IPython?

I am not sure it is possible, but it might be very nice to be able to move
the coloring code out of the core into the frontends - that way a frontend
could decide what format things needed to be colored in.  The downside is
another dep (or we throw it into externals?!)

Thoughts?  Feedback?

Cheers,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20090701/064f3fdc/attachment.html>


More information about the IPython-dev mailing list