[IPython-dev] pyreadline (Hey cocoa/QT/wx ipython GUI what do you think about this?)

Gael Varoquaux gael.varoquaux@normalesup....
Thu Mar 27 03:55:10 CDT 2008


On Thu, Mar 27, 2008 at 01:34:39AM +0100, Laurent Dufréchou wrote:
> When you use a widget, like scintilla one that I used, all the
> classical key
> where already handled by the text widget itself. I add to overload some
> to
> better match ipython shell behavior. Like pushing 'up', does not go up
> but
> call history back.
> So if you want VI mode , just design your ipython widget around a VI
> aware
> text widget, that's all...

If you head in this direction you are going to repeat the functionnality
in each front end. As a result you will have more code to maintain,
and inconsistent behavior between widgets.

> Developer must have the possibility to let or not readline to handle
> the
> keys.
> If he don't want to use readline key handling, he must have access to
> function that can make ipython execute a string, and that should be ok.

I just don't see why. The fonction call overhead is not the end of the
world. It is true that finding a decent interface between the readline
and the front end is hard, but it will make future development easier,
and the code easier to read. Anyhow, this is all theory for now, and
their is a lot of work before we actually face these problems.

> Readline only process key but does not manage widget directly.

Well, it gives back high-level instructions on the widget describing how
it behaves. Finding this set of high-level instructions is the key to
having a good decoupling between front ends and ipython.

Gaël


More information about the IPython-dev mailing list