Anand K Rayudu
anand.k.rayudu at esi-group.com
Mon Jul 5 16:47:10 CEST 2004
I have embedded python and want to execute python scripts from my
application. I need to call the execution of python repeatedly, and some
times same script again & again.
I am facing some problems , especially if i try to execute the same
Some times in loading my module. Even it looks like for loops are not
working, if i replace them with 'while' it worked.
This is on windows system with python 2.3.3 , I have win32 extensions also.
Can some body please review following and suggest if any thing is wrong
here. Or suggest better way of doing it.
// Python will be initialized only once in life time
// create new iterpeter
tstate = Py_NewInterpreter();
PyObject *result = PyRun_String(exec_command,Py_file_input,d,d) ;
// close current interpeter thread
tstate = NULL;
// My python coce looks like this
self.a = block
# very complex logic associated with my APIs here.
Thanks In advance.
More information about the Python-list