Message166258
Here is a patch that corrects the problem (quoted below and attached.) This only corrects the problem when 'PyOS_ReadlineFunctionPointer' is set, e.g. you must 'import readline', otherwise Python will defer to stdin/stdout with 'PyOS_StdioReadline'.
The patch:
--- Python-2.6.8/Parser/tokenizer.c 2012-04-10 11:32:11.000000000 -0400
+++ Python-2.6.8-patched/Parser/tokenizer.c 2012-07-23 19:56:39.645992101 -0400
@@ -805,7 +805,7 @@
return Py_CHARMASK(*tok->cur++);
}
if (tok->prompt != NULL) {
- char *newtok = PyOS_Readline(stdin, stdout, tok->prompt);
+ char *newtok = PyOS_Readline(tok->fp? tok->fp : stdin, tok->fp? tok->fp : stdout, tok->prompt);
if (tok->nextprompt != NULL)
tok->prompt = tok->nextprompt;
if (newtok == NULL)
Kevin Barry |
|
Date |
User |
Action |
Args |
2012-07-24 01:26:31 | Kevin.Barry | set | recipients:
+ Kevin.Barry |
2012-07-24 01:26:31 | Kevin.Barry | set | messageid: <1343093191.04.0.149053298428.issue14916@psf.upfronthosting.co.za> |
2012-07-24 01:26:30 | Kevin.Barry | link | issue14916 messages |
2012-07-24 01:26:30 | Kevin.Barry | create | |
|