I am going to try to embed python in an application, but in simple
testing, I could not get it to work.  The following code seems like it
should work, but it crashes, and I have tried several things.  What
could I be doing wrong?

#include <Python.h>

int main(int argc, char* argv[])
{
        FILE* fp = fopen("test.py","r");
        Py_Initialize();
        PyRun_SimpleFile(fp,"test.py");
        Py_Finalize();
        return 0;
}
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to