Skip to content

Conversation

Kosmonit
Copy link

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

@blankwall
Copy link
Owner

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

@blankwall
Copy link
Owner

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

@Kosmonit
Copy link
Author

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

@blankwall
Copy link
Owner

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.

@Kosmonit
Copy link
Author

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants