Where to insert Python readline?
Chris Gonnerman
chris.gonnerman at newcenturycomputers.net
Sun May 18 19:56:44 EDT 2003
----- Original Message -----
From: "Gary Bishop" <gb at cs.unc.edu>
> On Sun, 18 May 2003 17:44:21 -0500 "Chris Gonnerman"
> <chris.gonnerman at newcenturycomputers.net> wrote:
> > I hate to say this, but I've been there and done that
> > (well, mostly anyway). Check out:
>
> Thanks Chris,
>
> I had already seen your Python code (and learned quite a bit) but the
> link to the source appears to not be working at your web page so I
> can't see the source of the dll (which I realize is really simple).
Sorry about the link; I made a bugfix release but didn't get the
page updated for it. Try again, it should work fine.
> I *really* want completion and I want it all in Python using ctypes (a
> really great package). I was thinking of using Fredrik's cursor control
> functions (translated to Python) but your approach of relying on the
> console windows native interpretation of output characters is an easier
> to understand approach.
The console module never worked well for me, probably because I still
use Win9x on some of my computers.
What does the ctypes package have to do with anything, anyway? I don't
know about this module, but as far as I can see the only reasonable way
to use the readline hook is from C.
> I hallucinate that with a basic system (including completion) all in
> Python, we can get more people interested in expanding it to full
> functionality. The main things I want are completion and history so
> that IPython will work properly on Windows. Color could be cool..
>
> I plan to use as little of Console as possible so that will be easy to
> port. I got the PyOS_ReadlineFunctionPointer stuff going after my
> posting. I think I'm going that way.
>
> It would be nice if there was an easier way to takeover input editing
> in Python.
Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
http://newcenturycomputers.net
More information about the Python-list
mailing list