<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#CCFFFF">
I sent this to the wrong list a few hours ago. I hope I've gotten
it right this time...<br>
<br>
=====================================================<br>
<br>
I expect this has been asked before, but I can't find out much about
it...<br>
<br>
I'm trying to embed Python in a GTK+/C app as a scripting language
and I need to capture the output of PyRun_String(),
PyEval_EvalCode(), or whatever as a char * (or wchar_t * or
whatever) rather than have it go to stdout.<br>
<br>
I'm using Python 3.3.2 under plain C, not C++<br>
<br>
And, while I'm interrupting everyone's evening, another question: if
I pass Py_single_input to PyRun_String() or
Py_CompileString()/PyEval_EvalCode(), it accepts statements like
"a=10" and can then properly do stuff like "print(a)". If I use
Py_eval_input instead, I get error messages. In both cases, I'm
using the same global_dict and local_dict, if that makes any
difference. What am I doing wrong?<br>
<br>
Thanks,<br>
Chris Moller<br>
</body>
</html>