Hi
Duncan's example worked to a point. The line PyRun_String( "print x",
Py_file_input, dict, dict); print out the contents of x, but I don't want to
print x out. I want to be able to grab whateven the variable x contains so
that I can pass it on for further processing by the C++ application.
BTW
Hi Duncan
Your version of the app works apart from this part
else {
PyObject *rString = PyObject_Str(result);
if (rString==NULL) {
Py_DECREF(result);
PyErr_Print();
return;
}
printf( "The result is %s\n", PyStr
Hi
I spent the whole of yesterday trying the get the following C code to
execute
PyRun_String("def title();", Py_file_input, dict, dict);
PyRun_String("\treturn 'Foo Bar'", Py_file_input, dict, dict);
PyRun_String("x = title()", Py_file_input, dict, dict);
PyObject * result = PyRun_String("print
Hi
Is it possible to execute a whole script using the C API function
PyRun_String? At moment I load the script into a buffer. Then I get each
line of the script and pass it PyRun_String. This seems very inefficient. It
would be more efficient if I could pass the complete string buffer to
PyRun_Stri
Hi
Thank you very much. It seems the version tar that is embedded in WinRAR is
broken. It gets as far as the Mac directory and then bombs out. The version
of tar that is bundled with CygWin worked just fine
--
Best Regards
John
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I downloaded what I thought was the source code from
http://www.python.org/2.4.2/python-2.4.2.tgz
--
Best Regards
John
--
http://mail.python.org/mailman/listinfo/python-list
Hi
That particular file doesn't include the implementation files for the core
modules. The platform specific directories only include two or three files.
Only the Mac directory contains any C code files
--
Best Regards
John
--
http://mail.python.org/mailman/listinfo/python-list
Hi
Does anybody know from where I can get a copy of the source for Python
V2.4.2. I downloaded what is reckoned to be the source code from
www.python.org, but is turns out to be the MacXOS version with the core
modules missing. The reason I am looking for the source code is so I can
make a debug b
Hi
Could somebody, please tell me where I can find information about embedding
Python into a C/C++ application. The example in the docs is rather simple. I
am looking for something a bit more complex and longer
--
Best Regards
John
--
http://mail.python.org/mailman/listinfo/python-list