I'm following an c-module example in 'Programming Python'.

The C code depends on 'Python.h'.

The first thing I did was use Spotlight to find where 'Python.h' is.
I�found it:� /Developer/SDKs/MacOSX10.4.0.sdk/..../include/python2.3/Python.h� <-- def as PYHEADERS env variable in .login.

So I set the 'Header Search Paths' under 'Search Paths' in XCode via $PYHEADERS env variable that I had set in my .login file.
But this has no effect within XCode Build.

Any ideas?
Ric.


#include <Python.h>� <--- where?� "No such file or directory."
#include <string.h>

// Modle Functions
static PyObject *� � � � � � � � � � � � � � � � // returns object.
message(PyObject *self, PyObject *args) {� � � � // 'self' unused in modules. 'args' from python call.
� � char *fromPython, result[64];
� � if (!PyArg_Parse(args,"(s)",&fromPython))
� � � � return NULL;
� � else {
� � � � strcpy(result,"Hello, ");� � � � � � � � // build up C string.
� � � � strcat(result, fromPython);� � � � � � � � // add passed Python-string.
� � � � return Py_BuildValue("s",result);� � � � // convert C --> Python.
� � }
} // end message()
...� etc.
_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to