Hi, I have a script that I want to execute from C. I don't want to call any functions, just execute the script. Below is a code snippet.
The problem is that PyObject_CallObject always returns NULL. Is this the correct return value for simply executing a script, as there is no function return value involved? // load script pname = PyString_FromString(SCRIPTFILENAME); pmodule = PyImport_Import(pname); Py_DECREF(pname); if (pmodule != NULL) { // execute script presult = PyObject_CallObject(pmodule, NULL); if (presult == NULL) { Py_DECREF(pmodule); return; } Py_DECREF(presult); Py_DECREF(pmodule); } else { return; } regards, Andy [EMAIL PROTECTED] (remove year to reply) -- http://mail.python.org/mailman/listinfo/python-list