Message166301
| Author |
Kevin.Barry |
| Recipients |
Kevin.Barry |
| Date |
2012年07月24日.15:46:27 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1343144788.1.0.0170868816709.issue14916@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The patch from before needed a slight modification for when Python actually defaults to an interactive session on stdin. Since I rebuild this for my current distro (Slackware64 13.37,) I switched to the Python 2.6.6 source. This might not be the proper way to handle the default case (e.g. 'Py_Main'), but it's a start.
The patch (also attached):
--- ./Parser/tokenizer.c.orig 2012年07月23日 22:24:56.513992301 -0400
+++ ./Parser/tokenizer.c 2012年07月23日 22:23:24.329992167 -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 != stdin)? 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日 15:46:28 | Kevin.Barry | set | recipients:
+ Kevin.Barry |
| 2012年07月24日 15:46:28 | Kevin.Barry | set | messageid: <1343144788.1.0.0170868816709.issue14916@psf.upfronthosting.co.za> |
| 2012年07月24日 15:46:27 | Kevin.Barry | link | issue14916 messages |
| 2012年07月24日 15:46:27 | Kevin.Barry | create |
|