I've tried to replace
PyRun_SimpleString("import Pootle");
with
PyObject *obj = PyString_FromString("Pootle");
PyImport_Import(obj);
Py_DECREF(obj);
after initialising the module Pootle in some C code. The first seems to make the name Pootle
available to subsequent PyRun_SimpleString
calls, but the second doesn't.
Could someone please explain the difference to me? Is there a way to do what the first does with C API calls?
Thanks