Embedding Python in C/C++

Arno Baan a.baan at fokkerspace.nl
Fri Nov 2 11:20:27 EST 2001


Thanx, but for now I think I have all the answers I need.
I found a very helpful example on:
http://www.btinternet.com/~benjamin.geer/python/embedding.html

I'm sure I'll have a whole lot of other questions soon.

But for now,
Thanx.

arno

Dave Kuhlman wrote:

> 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.
>
> Suggestions:
>
> 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
> distribution.
>
> 3. Look at the function PyRun_SimpleString (in Section 2 of
> "Python/C API Reference Manual" in the standard Python
> documentation).
>
> 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
> >something
> >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