This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author btimby
Recipients
Date 2007-04-03.11:59:10
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Paul, thank you for clarifying. I agree with you completely. The reason I was unable to implement the API fully is the following problem (probably as you said due to the lack of dynamic features in C).

1. User defines python function.
2. User calls python readline.add_defun()
3. readline.add_defun() must whip up a C handler that will call the python function and in turn call rl_add_defun to register it. Problem being that multiple custom python functions registered with readline to a single C handler will have no way to determine which python function to call on invocation.
4. User calls readline.parse_and_bind()

I have no clue how to do step 3, so I avoided it. If anyone has suggestions, ideas or examples, I am happy to do the work, I simply have not had to do something like this before in C. I don't even know what this would be called in order to google for it.

The patch is certainly not as useful as the full API, however, I DID implement it to solve a problem, thus there is some use to it :-). I learned recently that I can maintain this feature as an extension (outside of) python, thus allowing me to continue to use it without depending on python maintainers to perceive usefulness. I will do this for the time being and if I am able to figure out item 3 I will resubmit the patch with a full implementation.
History
Date User Action Args
2007-08-23 15:57:47adminlinkissue1690201 messages
2007-08-23 15:57:47admincreate
Morty Proxy This is a proxified and sanitized view of the page, visit original site.