diff options
author | Guido van Rossum <guido@python.org> | 1997-02-18 21:53:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-02-18 21:53:32 (GMT) |
commit | fbd64c8790e2cec2d6bc44d3d13f39b9a5940e12 (patch) | |
tree | 5e23863872dcb4b00049ce0fea76f01193d27011 /Doc/lib/libthread.tex | |
parent | 384d249006b786b7d1eed21795a83a5ab703cb96 (diff) | |
download | cpython-fbd64c8790e2cec2d6bc44d3d13f39b9a5940e12.zip cpython-fbd64c8790e2cec2d6bc44d3d13f39b9a5940e12.tar.gz cpython-fbd64c8790e2cec2d6bc44d3d13f39b9a5940e12.tar.bz2 |
Restructured quite a bit, hopefully Lee Busby will find this useful.
Also grandly renamed.
Here's the new interface:
When WITH_READLINE is defined, two functions are defined:
- PyOS_GnuReadline (what used to be my_readline() with WITH_READLINE)
- PyOS_ReadlineInit (for Dave Ascher)
Always, these functions are defined:
- PyOS_StdioReadline (what used to be my_readline() without WITH_READLINE)
- PyOS_Readline (the interface used by tokenizer.c and [raw_]input().
There's a global function pointer PyOS_ReadlineFunctionPointer,
initialized to NULL. When PyOS_Readline finds this to be NULL, it
sets it to either PyOS_GnuReadline or PyOS_StdioReadline depending on
which one makes more sense (i.e. it uses GNU only if it is defined
*and* stdin is indeed a tty device).
An embedding program that has its own wishes can set the function
pointer to a function of its own design. It should take a char*
prompt argument (which may be NULL) and return a string *ending in a
\n character* -- or "" for EOF or NULL for a user interrupt.
--Guido van Rossum (home page: http://www.python.org/~guido/)
Diffstat (limited to 'Doc/lib/libthread.tex')
0 files changed, 0 insertions, 0 deletions