Hello everyone,
We are trying to implement our own interactive interpreter in our
applicationusing an embedded Python interpreter.
I was wondering what would be the best way to retreive as text the result of
executing Python code. The text must be exactly the same as it would be in
thestand
> If you use the same workflow as you do currently, it won't
You're right it shouldn't cause a blocking call.
> Come to think of it, you might as well just use StringIO.
Yes I could probably replace std{in, out, err} with stringIO objects and
retrieve their contents throughthe api.
I'll look into
> Is the `code` module (http://docs.python.org/library/code.html) an
> insufficiently exact copy of an interpreter for you?
The problem isn't really to emulate the behavior of the interpreter as to
obtain the result of the execution as a string in c++. The code module doesn't
seem to help with