[IPython-dev] IPython with Color on windows
gb at cs.unc.edu
Sat May 24 16:14:54 EDT 2003
On Sat, 24 May 2003 12:53:40 -0600 "Fernando Perez"
<fperez at colorado.edu> wrote:
> Ah, ok. Ipython has basically three areas where color is supported:
> - in/out prompts
I already do in prompts down in my readline code.
> - 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.
I *should* be working on something else but having fun with this. I'm
going to have to quit (for a while at least) pretty soon.
There is a stylistic issue in the change that I think you should
answer, even if I hack the code. This change could happen at least 2
ways that I can think of.
1) Add a module that contains a file-like object that everyone uses to
write to the console. Pretty easy to implement and small changes to
modules. Outside windows the file-like object is just sys.stdout.
Inside windows it is some filter code that uses my console code.
2) Pass the object down into the various other classes (ultraTB,
Inspect) using their init methods. Might be doable but I'd have to
understand the code a lot better than I do now.
Other possibilities? Preferences?
More information about the IPython-dev