[EMAIL PROTECTED] wrote: > Feat> I've carefully read the section about building extensions, ... > Feat> but this doesn't tell me how to locate the right Python header > Feat> file... > > Distutils takes care of that for you. All you should need to do is > > #include "Python.h" > > in your source. As you concluded, the correct one to use is the one which > corresponds to the Python executable you're using. I believe distutils uses > sys.exec_prefix and the version of the running Pyhon to get a base directory > for the installation. From there it's just a hop, skip and jump to the > installed Include directory which corresponds to that running executable.
Just for the record, the distutils have a function that returns the include path: >>> import distutils.sysconfig >>> distutils.sysconfig.get_python_inc() '/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5' So if you really need to know the include path for some reason, you should use this function as it is platform independent. But as was said above, when compiling an extension module adding this path manually is not required. - Matthias - _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig