Re: Please help in calling python fucntion from 'c'

Sept. 4, 2002
4:29 p.m.
Praveen Patil wrote:
I want to call python function from 'c' function.
The easiest way is this: PyRun_SimpleString("TestFunction()"); If you need to get return values back or if you want to run the code in other than the "__main__" module, you can use PyRun_String. If you need to pass in PyObjects to a function instead of just running a string, then you need to use PyObject_CallFunction. PyRun_String and PyRun_SimpleString are described here: http://www.python.org/doc/current/api/veryhigh.html PyObject_CallFunction is described here: http://www.python.org/doc/current/api/object.html#l2h-179 Brent
8286
Age (days ago)
8286
Last active (days ago)
0 comments
1 participants
participants (1)
-
Burley, Brent