homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:31Kevin.Barrysetrecipients: + Kevin.Barry
2012年07月24日 01:26:31Kevin.Barrysetmessageid: <1343093191.04.0.149053298428.issue14916@psf.upfronthosting.co.za>
2012年07月24日 01:26:30Kevin.Barrylinkissue14916 messages
2012年07月24日 01:26:30Kevin.Barrycreate

AltStyle によって変換されたページ (->オリジナル) /