Issue 1554133: PyOS_InputHook() and related API funcs. not documented (original) (raw)

Created on 2006-09-07 14:06 by akuchling, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
inputhook.txt akuchling,2013-05-24 20:35 review
Messages (8)
msg60996 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2006-09-07 14:06
AFAICT, PyOS_InputHook() isn't described anywhere in the docs. Even the .h files don't contain comments explaining it.
msg84470 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 03:08
The only mention I can find is in Misc/HISTORY: When the interpreter shell is invoked interactively, it attempts to import the readline module; when this fails, the default input mechanism is used. The hook variables are PyOS_InputHook and PyOS_ReadlineFunctionPointer.
msg130402 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-03-09 02:42
A.B, I believe you have looked at other areas of missing C-API docs. What do you think of this one? Is it still missing?
msg189929 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-05-24 20:35
Here's a proposed patch to the c-api manual that describes these two pointers. I put them in the 'very high-level API' section. Maybe they belong in the Operating System Utilities section instead, but I think they're intertwined with the interpreter loop and therefore belong in the 'very high-level' section.
msg189930 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-05-24 20:46
I am not a C-api user, but the entries are pretty clear to me and seem ready to apply. The usage examples are a nice touch. OS Utilites is not where I would expect interpreter loop hooks, so I think the current location is better.
msg189932 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2013-05-24 21:20
One question about the patch: how to give the prototype expected for the function? I currently have it as: char *(*PyOS_ReadlineFunctionPointer)(FILE *stdin, FILE *stdout, char *prompt) Would it be better with a trivial function name, as in: char *func(FILE *stdin, FILE *stdout, char *prompt)
msg189936 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-05-24 22:27
Can one of you three answer Kuchling's question about formatting a data entry that consists of a function pointer with function signature?
msg190262 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-05-29 01:48
New changeset 672614d809a1 by Andrew Kuchling in branch 'default': #1554133: Document PyOS_InputHook, PyOS_ReadlineFunctionPointer http://hg.python.org/cpython/rev/672614d809a1
History
Date User Action Args
2022-04-11 14:56:20 admin set github: 43954
2013-05-29 01:50:33 akuchling set status: open -> closedstage: commit review -> resolvedresolution: fixedversions: - Python 2.7, Python 3.3
2013-05-29 01:48:44 python-dev set nosy: + python-devmessages: +
2013-05-24 22:27:32 terry.reedy set nosy: + georg.brandl, ezio.melotti, eric.araujomessages: +
2013-05-24 21:20:22 akuchling set messages: +
2013-05-24 20:46:40 terry.reedy set stage: commit reviewmessages: + versions: + Python 3.4, - Python 3.1, Python 3.2
2013-05-24 20:35:39 akuchling set files: + inputhook.txtmessages: +
2011-03-09 02:42:33 terry.reedy set nosy: + terry.reedy, belopolskymessages: + versions: + Python 3.3
2010-08-24 20:31:22 BreamoreBoy set assignee: docs@pythonnosy: + docs@python
2010-08-07 18:33:08 terry.reedy set versions: - Python 2.6
2010-07-10 06:25:32 terry.reedy set versions: + Python 3.1, Python 2.7, Python 3.2
2009-03-30 03:08:05 ajaksu2 set type: enhancementmessages: + nosy: + ajaksu2
2006-09-07 14:06:51 akuchling create