embed python

Peter Strempel peterstrempel at yahoo.com
Sun Mar 14 03:51:54 EST 2004


In article <c311q8$1vah$1 at news.riken.go.jp>, Marc Schellens wrote:

>> Usually "#include "Python.h" is the right way.

> ok, but why everybody writes #include "Python.h" instead of
> #include <Python.h> ? The latter form is the corrcet one for
> header files wich are not part of the actual project.

Yes, you are right. Should be <Python.h>. I was sloppy in my post.
GCC should be generous and accept "Python.h", too, but it might not
work with all compilers.

I checked my current project code, it has <Python.h>. I don't know what
everyone else writes. :)

Not exactly related to your question, but if you are doing embedding,
have a look at Pyrex which can be misused for extremely simple embedding
as it saves you the need to write all the C boilerplate code. This isn't
exactly what Pyrex is made for, but is a wonderful way to save some
time and efforts.

 Peter



More information about the Python-list mailing list