[IPython-dev] pyreadline refactoring
Thu Jun 26 08:05:51 CDT 2008
Good news :)
When i wrote ipython0 wx frontend i ran into some problem with readline.
(And perhaps I ran in these problems because I don't enter enough in
pyreadline code who knows...)
- History (the biggest one):
It was not that easy to get these information:
HistoryBack and HistoryForward, and history current length.
So if you could add some simple and direct method that permit to load a
history from file, and manage an history pointer I'll be very very happy.
If you don't understand what I mean just have a look at line 300 of
ipshell_nonblocking.py in /gui/wx I think you'll see what I didn't found in
I fact should be good to have some simple function to get easily an history.
Currently to get history I use....:
That is far from ideal...
- In my code I used pyreadline capabilities to get ascii colored outputted
Do you think it could be possible to add some other output formatter like
for example an xml formatter or html for example. Perhaps just a method to
bypass classical readline formatter and people could add their formatter
(thus we could step by step add new formatter to readline code)
Just an idea...
- Can it be possible to use readline only for history and output formating?
I mean without key handling and cursor management? (If for example I want
for any reason manage them myself)
> -----Message d'origine-----
> De : email@example.com [mailto:ipython-dev-
> firstname.lastname@example.org] De la part de Barry Wark
> Envoyé : mercredi 25 juin 2008 00:37
> À : Jörgen Stenarson
> Cc : IPython-dev List
> Objet : Re: [IPython-dev] pyreadline refactoring
> On Tue, Jun 24, 2008 at 12:42 PM, Jörgen Stenarson
> <email@example.com> wrote:
> > Hi,
> > I have started to work on a refactoring of pyreadline with the goal
> > untangle the class interactions that have made it difficult to reuse
> > pyreadline in other circumstances than a shell on win32.
> > The basic idea is that it should be possible to call a readline
> > with keypress events containing (control, shift, meta, char, keyname)
> > where keyname is for special keys like space, f1, return etc.
> > The readline object would be responsible for keeping track of current
> > prompt, line_buffer, cursor_position and selection_position. But the
> > caller of the object will have to render the buffer.
> > I have also merged the callback branch I worked on a few months back.
> > The branch is at lp:~jorgen-stenarson/pyreadline/pyreadline-refactor
> > If anyone has any ideas or suggestions on how things should work
> > let me know.
> Wow, this is an exciting move in view of the plans to separate
> ipython0's core from the terminal/readline. I am still learning about
> pyreadline, but your description above makes me think that you, me,
> and Gaël should think about using the new (refactored) pyreadline in
> developing a base class for front ends that are based on a
> line-oriented interface (i.e. mimicking the terminal interface).
> > /Jörgen
> > _______________________________________________
> > IPython-dev mailing list
> > IPythonfirstname.lastname@example.org
> > http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
> IPython-dev mailing list
More information about the IPython-dev