Embedding Python in C/C++

Dave Kuhlman dkuhlman at rexx.com
Tue Oct 30 17:30:59 CET 2001

Yes it is possible to embed the Python interpreter in a C/C++
application.  Yes it is possible to evaluate Python scripts from
within C/C++ code.  And yes, Python was intended for this purpose.


1. Read "Extending and Embedding the Python Interpreter" in the
standard Python documentation.

2. Work with the examples in Demo/embed in the Python source code

3. Look at the function PyRun_SimpleString (in Section 2 of
"Python/C API Reference Manual" in the standard Python

4. Ask some more questions.

  - Dave

Arno Baan <a.baan at fokkerspace.nl> wrote:

>I'm trying to find out wether Python is the answer to my problem.
>I want to write a C/C++ program wich takes a XML input.
>This input will also contain functions in a scripting language
>(python?), that can
>directly access objects in the main C program.
>Is this possible and can someone perhaps give me an example of
>like this being done?
>I'm completely new to Python.

> Oeps Sorry,
> wrong name and e-mail adress above the preivious mail.
> The name should be arno baan and the adress a.baan at fokkerspace.nl
> Help is still needed though.
> thanx arno

Dave Kuhlman
dkuhlman at rexx.com

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

More information about the Python-list mailing list