Hi! Can anyone help me with this issue?
int main (int argc, char * const argv[]) { Py_Initialize(); FILE* fp = fopen("/Users/test/Desktop/123.pyc","wb"); PyCodeObject* op = (PyCodeObject*)Py_CompileString("import sys \nprint 'hello'","<string.py>",Py_file_input); PyMarshal_WriteObjectToFile((PyObject *)op, fp, Py_MARSHAL_VERSION); Py_Finalize(); return 0; } This Code crashs on Windows, and I can't explain why. I want to convert a PyCodeObject to a PyObject and save it to the harddisk. PyMarshal_ReadObjectFromFile(FILE *P) crashs too if I want to read a byte-compiled object. Thank your for your help. donnerChecker -- http://mail.python.org/mailman/listinfo/python-list