Printing returned object in embedded app
Conrad Steenberg
conrad at vanir.srl.caltech.edu
Sat Jul 10 16:08:37 EDT 1999
On 10 Jul 1999 18:24:33 GMT, Conrad Steenberg <conrad at vanir.srl.caltech.edu>
wrote:
>On Sat, 10 Jul 1999 01:40:18 GMT, Michael P. Reilly <arcege at shore.net> wrote:
>>
>>Try:
>> PyObject_Print(object, stdout, Py_PRINT_RAW);
>
>Thanks!
>
>Conrad
>--
Hmmm... Sorry to reply to my own message, but it seems like PyRun_String
returns only the Py_None object!
How can I get the result of a calculation, say
obj=PyRun_String ("1+1", start, globals, locals);
which should be a numeric object?
The behaviour I'm trying to get is the same as running python on a terminal:
when an instruction have a printable result, I want to print it.
Cheers
Conrad
--
More information about the Python-list
mailing list