Python_Pin
Python_Pin copied to clipboard
Python_Pin on Windows under MS Visual Studio 2005
REMARK on Windows
I compiled the project Python_Pin on Windows under MS Visual Studio 2005 but I found errors at compile time.
Files pin.h and python.h should be different namespace.
I placed python.h in namespace SPPY:
namespace SPPY
{
#include <Python.h>
}
This helped
This code don't work on Windows:
// FILE* tool = fopen(filename, "r");
// if (tool == NULL) {
// perror("fopen");
// exit(1);
// }
//
// SPPY::PyRun_SimpleFile(tool, filename);
// fclose(tool);
And replace on this code:
SPPY::PyObject* PyFileObject = SPPY::PyFile_FromString((char *)filename, "r");
SPPY::PyRun_SimpleFile(SPPY::PyFile_AsFile(PyFileObject), filename);
We are in the process of reviewing this pull to ensure full functionality
Went ahead and added it as a branch atm until further testing can be done
Ok, test my branch. Code must work, I tested it on Windows 7, Visual Studio 2005, Python 2.7.
I added your branch here: https://github.com/blankwall/Python_Pin/tree/Python_Pin_Windows. I will merge iy with the main branch when I get more time to finish the testing.
Ok