PyRun_SimpleFile arguments
yslee
yslee at vmstech.po.my
Wed Sep 20 08:48:26 EDT 2000
More information about the Python-list mailing list
Wed Sep 20 08:48:26 EDT 2000
- Previous message (by thread): PyRun_SimpleFile arguments
- Next message (by thread): Driver for ODBMS (Object Database)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This is caused by the MSVC /MD compiler setting, originally my setting is /ML. I got the answer from the Python FAQ, sorry for not referring to it first. YS Lee ----- Original Message ----- From: "yslee" <yslee at vmstech.po.my> To: <python-list at python.org> Sent: Wednesday, September 20, 2000 11:01 AM Subject: PyRun_SimpleFile arguments > I'm trying to embed the Python interpreter in my C++ application, I do > something like this in my code : > > Py_Initialize(); > FILE* fp; > > if( (fp = fopen( "test.py", "r" )) == NULL ) > printf( "The file 'test.py' was not opened (%d)\n", id); > else > printf( "The file 'test.py' was opened (%d)\n", id); > if (PyRun_SimpleFile(fp, "d:\\projects\\python\\test\\test.py")!=0) > printf("PyRun_SimpleFile fails (%d)\n", id); > > Do I pass the right arguments to PyRun_SimpleFile? The program crash at the > statement where I call it. > > YS Lee > Software Developer > VMS Technology Sdn Bhd >
- Previous message (by thread): PyRun_SimpleFile arguments
- Next message (by thread): Driver for ODBMS (Object Database)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list