[IPython-user] feature request

Flavio Coelho fccoelho@gmail....
Mon Jan 18 14:47:38 CST 2010

I was not refering to the curses popup completion and call tips, but just
using Pygments  to highlight code as it is entered. Does Pygment depend on
Curses? I don't think so. Example:

from pygments import highlightfrom pygments.lexers import
PythonLexerfrom pygments.formatters import TerminalFormatter
code = 'print "Hello World"'print highlight(code, PythonLexer(),

Voilá, you get highlighted code in the terminal, without the need for curses....

On Mon, Jan 18, 2010 at 3:29 PM, Robert Kern <robert.kern@gmail.com> wrote:

> On 2010-01-18 04:14 AM, Flavio Coelho wrote:
> > a little aesthetic request:
> >
> > I wonder how hard would it be to have on the fly syntax highlighting as
> > we can find in the bpython <http://bpython-interpreter.org/home/>
> > interpreter. Bpython uses pygments.
> The difficulty isn't the syntax highlighting but the cross-platform
> terminal
> support. bpython uses curses and thus is not portable to Windows. curses
> cannot
> be used for the main frontend to IPython. Implementing the cross-platform
> terminal support for such things yourself would also be tricky to
> accomplish.
> However, if you are willing to put in the effort, a UN*X-specific,
> bpython-like
> frontend to IPython could be made along the same lines as the wx and Qt
> frontends.
> --
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless
> enigma
>  that is made terrible by our own mad attempt to interpret it as though it
> had
>  an underlying truth."
>   -- Umberto Eco
> _______________________________________________
> IPython-user mailing list
> IPython-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

Flávio Codeço Coelho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20100118/e47b4c2f/attachment.html 

More information about the IPython-user mailing list