PyRun_String with Py_single_input to stdout?

S

stuart.tett

I'm using PyRun_String with Py_single_input for a python interpreter
embedded in my application. I'm using Py_single_input. Py_single input
is what I want, but it seems to output to stdout. Before when I was
using Py_eval_input I was able to grab the result so I could print it
in a text box:

PyObject *resultObject = PyObject_Str( rstring );
if( resultObject != NULL ) {
//char *string = PyString_AsString( resultObject );
}

But Py_eval_input is only for
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top