> #include<python.h> > > char code[] = "print 'hello moshe'"; > > void main(...) > { > Py_ExecString(code); > }
I don't get this, with python 2.4 there is no function called Py_ExecString in any of the header files. I found something that might do the job PyRun_SimpleString( ) in pythonrun.h, but couldn't get it to work either. So what is really the way to execute python code in a string from a C program? -- http://mail.python.org/mailman/listinfo/python-list