adding python engine into c++ application

G

griwes

Hello, I am going to write an application in C++, application which
should be easy to extend by scripts. I chose python for script
language in this application. I'd like to have own API for python. And
here the question arises: how do I implement a python engine within an
application written in C++?

Sory for any mistakes, english isn't my native language ;)
 
D

Diez B. Roggisch

griwes said:
Hello, I am going to write an application in C++, application which
should be easy to extend by scripts. I chose python for script
language in this application. I'd like to have own API for python. And
here the question arises: how do I implement a python engine within an
application written in C++?

Sory for any mistakes, english isn't my native language ;)

http://www.python.org/doc/2.5.2/ext/embedding.html

Diez
 
S

Stefan Behnel

griwes, 29.12.2009 12:25:
Hello, I am going to write an application in C++, application which
should be easy to extend by scripts. I chose python for script
language in this application. I'd like to have own API for python. And
here the question arises: how do I implement a python engine within an
application written in C++?

Since you likely want to establish some kind of Python level API that wraps
your C++ code (so that Python code can talk to it), you might want to take
a look at Cython:

http://cython.org

Stefan
 
B

bobicanprogram

Hello, I am going to write an application in C++, application which
should be easy to extend by scripts. I chose python for script
language in this application. I'd like to have own API for python. And
here the question arises: how do I implement a python engine within an
application written in C++?

Sory for any mistakes, english isn't my native language ;)


If you want to keep your C++ and Python as separate but interacting
modules you might want to check out the SIMPL project's (http://
www.icanprogram.com/SIMPL) Python hooks. There is some tutorial
level code here:

http://www.icanprogram.com/06py/main.html

bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top