Embedding Python in Your C Programs (Linux Journal)
[Posted December 30, 2005 by ris]
Linux Journal has
this
article on embedding Python code into C programs. "
Including the
Python interpreter in your program is extremely simple. Python provides a
single header file for including all of the definitions you need when
embedding the interpreter into your application, aptly named Python.h. This
contains a lot of stuff, including several of the standard headers. For
compiling efficiency, it might be nice if you could include only those
parts of the interface that you actually intend to use, but unfortunately
Python doesn't really give you that option. If you take a look at the
Python.h file, you'll see that it defines several important macros and
includes a number of common headers that are required by the individual
components included later in the file."
(
Log in to post comments)