Message166258
| Author |
Kevin.Barry |
| Recipients |
Kevin.Barry |
| Date |
2012年07月24日.01:26:29 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1343093191.04.0.149053298428.issue14916@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| 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 |
|