Message184537
| Author |
emmanuel |
| Recipients |
Kevin.Barry, emmanuel, vstinner |
| Date |
2013年03月18日.22:11:18 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1363644678.88.0.560302588826.issue14916@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Kevin,
These are good points.
I had a cursory look at the python source code and observed the following:
- There may also be a concern with stderr (used to print the prompt in PyOS_Readline)
- PyOS_Readline has two different definitions in files pgenmain.c and myreadline.c
- There is this interesting comment in myreadline.c:
/* By initializing this function pointer, systems embedding Python can
override the readline function.
Note: Python expects in return a buffer allocated with PyMem_Malloc. */
char *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *);
This pointer is actually used (set it to (void*)1 and the interpreter crashes) so it could offer a means to redirect stdin as we want. For stdout/stderr further investigation is needed. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年03月18日 22:11:19 | emmanuel | set | recipients:
+ emmanuel, vstinner, Kevin.Barry |
| 2013年03月18日 22:11:18 | emmanuel | set | messageid: <1363644678.88.0.560302588826.issue14916@psf.upfronthosting.co.za> |
| 2013年03月18日 22:11:18 | emmanuel | link | issue14916 messages |
| 2013年03月18日 22:11:18 | emmanuel | create |
|