[IPython-dev] Last mail for the night
Sat Aug 30 20:04:39 CDT 2008
On Sun, Aug 31, 2008 at 02:40:52AM +0200, Laurent Dufréchou wrote:
> So If I well understood there is two method to change colors...:
> Modify self.ANSI_STYLE and/or modify self.style, then call
Actually, to do this, you need to call "_configure_scintilla". Tell me if
you can't get this working.
This code could be cleaner. If you want to have a go a making a patch to
improve this, I would be happy to accept it, as long as you try to keep
the code quality high.
> I've also tried to modify prompt (I like a lot the green /red original
> I've trie with no success, If you could also help me...
> self.prompt_in1 = 'In $number:' ß just to try
> self.prompt_out = 'Out $number:'
> self.output_prompt_template = string.Template(self.prompt_out)
> self.input_prompt_template = string.Template(self.prompt_in1)
> don't work, the prompt don't change...
This won't change the existing prompts, but it should new one. I suspect
your are not setting these variables at the right time. You need to do
this before you call the parent class __init__ as this call print the
first prompt. I think this stinks a bit, but this is a direct consequence
of having the frontend also being a widget. I think more and more the
frontend should be a subobject of the widget, rather than a parent in the
class hierarchy of the widget. I want to discuss this with Barry,
however, as I know he has spent some time thinking about this.
> From what I've seen from now, I'm quite happy with it, It looks like my
> old code with the rounded corner,
I didn't code this out of the blue. I spent a while studying your code,
as well as other python graphical shells.
> Subclassing WXController seems ok for now. You just don't handle by
> default fonts, but seems easy to add in my class.
Great. I am excited about this new devlopment. I really had this kind of
usecases in mind for the frontend.
A piece of warning, thought, there are still some things that will change
with the frontend. Not only is there too much coupling between the model
and the view (I still haven't identified well what the model is), but
also the code is sometimes too much line-oriented for not good reason,
and should be abstracted for a more general block-oriented approach, with
the line-oriented being a special case (I know Barry is interested in
block-oriented, and I am very much looking forward to working with him on
More information about the IPython-dev