Python_Pin icon indicating copy to clipboard operation
Python_Pin copied to clipboard

Python_Pin on Windows under MS Visual Studio 2005

Open Kosmonit opened this issue 10 years ago • 5 comments

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);

Kosmonit avatar Feb 20 '15 09:02 Kosmonit

We are in the process of reviewing this pull to ensure full functionality

blankwall avatar Feb 23 '15 17:02 blankwall

Went ahead and added it as a branch atm until further testing can be done

blankwall avatar Feb 23 '15 17:02 blankwall

Ok, test my branch. Code must work, I tested it on Windows 7, Visual Studio 2005, Python 2.7.

Kosmonit avatar Feb 23 '15 18:02 Kosmonit

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.

blankwall avatar Feb 23 '15 18:02 blankwall

Ok

Kosmonit avatar Feb 23 '15 19:02 Kosmonit