[IPython-dev] IPython with Color on windows
fperez at colorado.edu
Sat May 24 13:53:40 CDT 2003
Gary Bishop wrote:
> On Fri, 23 May 2003 19:56:56 -0600 "Fernando Perez"
> <fperez at colorado.edu> wrote:
>>Ipython prints all output via the Prompts classes. Take a look at that
>>file, it's fairly simple. It uses the fact that python itself honors
>>whatever is hooked into sys.displayhook:
> The appears to only apply to prompts 'In' and results from
> computations. If I look at ultraTB.py I see
> def __call__(self, etype, value, elist):
> print >> sys.stderr, self.text(etype,value,elist)
> greping for 'print' is see many but few that involve color so most are OK.
Ah, ok. Ipython has basically three areas where color is supported:
- in/out prompts
- object info (via ?)
- exception tracebacks.
I guess that in order for you to get coloring to work under Win, some
refactoring will be indeed needed, at least to make the output channels not
default to stdout, but be runtime configurable.
This is probably a good thing in the long run, as it will make it easier to
plug ipython into whatever other system which has its own idea of handling output.
But it also means it's a bigger task I'd initially thought. I'm perfectly
happy to give it a go as part of the 0.4 series, since it's part of bringing
feature-parity for Windows. But I have so much other work to tend to, that I
will unfortunately be rather slow. If you can make progress faster on your
own, don't hesitate to send me the patches. We could even open up a separate
CVS branch for this if you want. Otherwise, we'll move along, albeit a bit slow.
More information about the IPython-dev