msg60996 - (view) |
Author: A.M. Kuchling (akuchling) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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)  |
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 |
|
|