Problem with C-API

2006-03-17 Thread John Dean
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 x,

Re: Problem with C-API

2006-03-17 Thread John Dean
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,

Re: Problem with C-API

2006-03-17 Thread John Dean
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

Embedded Python

2006-03-10 Thread John Dean
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

Python V2.4.2 source code

2006-02-06 Thread John Dean
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

Re: Python V2.4.2 source code

2006-02-06 Thread John Dean
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

Re: Python V2.4.2 source code

2006-02-06 Thread John Dean
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

Re: Python V2.4.2 source code

2006-02-06 Thread John Dean
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

Embedding Python into C/C++ applications

2006-02-03 Thread John Dean
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

ANN: Rekall/WEB

2005-05-16 Thread John Dean
Hi I would like to announce the release of Rekall/WEB. Through the power of Python, you can now turn your Rekall desktop application into a web based application, with any loss of functionality and with a comparable look 'n feel. You can now design on the desktop and deploy on the web. There is