[Patches] [ python-Patches-1175004 ] Export more libreadline API functions

SourceForge.net noreply at sourceforge.net
Mon Apr 11 02:00:09 CEST 2005


Patches item #1175004, was opened at 2005-04-01 20:30
Message generated for change (Comment added) made by mwh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1175004&group_id=5470

Category: Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Bruce Edge (bruce_edge)
Assigned to: Nobody/Anonymous (nobody)
Summary: Export more libreadline API functions

Initial Comment:
The python readline.c is missing several of the API
funcs provided by libreadline. This patch adds the
missing ones that I needed.
Add support for libreadline callbacks to python functions.
eg:
readline.set_py_callback_hook( my_func )

Also, export rl_delete_text, rl_message,
rl_on_new_line, rl_forced_update_display,
rl_position_cursor

-Bruce

----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2005-04-11 01:00

Message:
Logged In: YES 
user_id=6656

I've just broken this patch by changing the signature of the set_hook/
on_hook functions.

There seem to be some whitespace oddities (e.g. right at the start of the 
patch).

The docstrings should use the PyDoc_STRVAR macros.

I'm not sure about some of the details of the py_callback stuff (although 
the functionality seems desirable):

1) the name -- I think I'd find python_command more transparent
2) it would be nice to pass the count and key arguments to the Python 
callable
3) the comments around it's implementation don't make much sense to 
me.
4) the example in the docs -- which is what finally clued me in to what the 
function did :) -- isn't self-contained.

None of this should be very hard to deal with, but I don't know when/if I'd 
get round to it myself.

----------------------------------------------------------------------

Comment By: Bruce Edge (bruce_edge)
Date: 2005-04-04 16:25

Message:
Logged In: YES 
user_id=1251183

I got the OK to work on the docs. Here's the patch
resubmitted with the libreadline.tex changes.

-Bruce

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-04-01 22:31

Message:
Logged In: YES 
user_id=21627

As incomplete work, we might have to reject it, unless
somebody volunteers to complete it. Let's give it one month
from now.

----------------------------------------------------------------------

Comment By: Bruce Edge (bruce_edge)
Date: 2005-04-01 22:16

Message:
Logged In: YES 
user_id=1251183

AFAIK, yes, they have always been available, at least in
Linux. I've been carrying this patch around since python 2.1.
I have not looked into this on other platforms.
I can't commit to providing doc changes. With my schedule,
it was all I could do to package it up and send it in. 
I'm sorry, I know this is incomplete work, but I figure
someone may be able to use it.

-Bruce

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-04-01 21:57

Message:
Logged In: YES 
user_id=21627

Have these function always been available in readline (i.e.
all readline versions)? If not, please provide configure.in
changes.

Also, please provide Doc/lib/libreadline.tex changes.

If you cannot provide these things, please indicate so.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1175004&group_id=5470


More information about the Patches mailing list