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.

Title: Allowing get_pre_input_hook from Readline
Type: enhancement Stage: test needed
Components: Extension Modules Versions: Python 3.8
Status: open Resolution:
Dependencies: Superseder:
Assigned To: CuriousLearner Nosy List: Conrad.Irwin, CuriousLearner
Priority: normal Keywords: patch

Created on 2008-12-03 01:49 by Conrad.Irwin, last changed 2022-04-11 14:56 by admin.

File name Uploaded Description Edit
readline.c.diff Conrad.Irwin, 2008-12-03 01:49 A diff of the changes
Messages (3)
msg76808 - (view) Author: Conrad.Irwin (Conrad.Irwin) Date: 2008-12-03 01:49
At the moment there is no way of getting the current pre_input_hook out
of the readline module, so applications cannot set_pre_input_hook
without possibly over-writing users settings (or other parts of the
applications settings) I have attached a patch that implements this

It is probably not very useful in many situations, but I am now using it
to maintain my normal custom auto-indenting python prompt in a library
that allows me to edit arbitrary strings using readline. A better way to
implement this might be to
msg76809 - (view) Author: Conrad.Irwin (Conrad.Irwin) Date: 2008-12-03 01:51
...wrap the current readline in a pure python module
msg336396 - (view) Author: Sanyam Khurana (CuriousLearner) * (Python triager) Date: 2019-02-23 18:15
I'm working on applying this patch cleanly and writing a test for this.

However, it seems I'm unable to import `readline` in compiled version of Python. I'm trying to provide a path to the installation of readline in my system using LDFLAGS, and then reconfiguring and recompiling, but seems like it didn't work.

Can someone provide me a pointer here, please?
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48752
2019-02-23 18:15:43CuriousLearnersetversions: + Python 3.8, - Python 3.3
nosy: + CuriousLearner

messages: + msg336396

assignee: CuriousLearner
2011-11-29 06:04:57ezio.melottisetstage: test needed
components: + Extension Modules, - Library (Lib)
versions: + Python 3.3, - Python 3.2
2010-06-17 02:06:48terry.reedysetversions: + Python 3.2, - Python 2.5
2008-12-03 01:51:49Conrad.Irwinsetmessages: + msg76809
2008-12-03 01:50:51Conrad.Irwinsettype: enhancement
2008-12-03 01:49:36Conrad.Irwincreate