Message166301
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 |
|
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 | |
|