embedding Python and changing stdin, stdout and stderr

Vincent Touquet vincent.touquet at gmail.com
Mon Sep 6 12:35:12 EDT 2004


Thanks for the link, there are spaces between the +-es though, so
anyone following the link should just remove them first :)

Another solution to my problem would be an interactive Python
interpreter written in Python, which I could run atop of the embedded
Python/Jython (that works like a charm, except the fact that the parser
reads from the C stdin constant FILE* file descriptor, which is a PITA
to plug into in a portable way, as FILE is very much platform and
compiler specific ...), and for which replacing the source of the
parser should be much easier and portable (Python code is nicely
portable) than it would be to change the source of the parser of Python
itself (note: I'm talking about _interactive_ mode, if the parser reads
from a file it is very easy to change the sourcefile the parser reads
from of course).

I know that IDLE exists, but it depends on Tk, I'd rather have an
interactive Python interpreter written in Python that is a console app,
so I want minimal extra dependencies  :) Any takers ?
best regards,

Vincent




More information about the Python-list mailing list