Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

adding python engine into c++ application

0 views
Skip to first unread message

griwes

unread,
Dec 29, 2009, 6:25:19 AM12/29/09
to
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 ;)

Diez B. Roggisch

unread,
Dec 29, 2009, 6:40:37 AM12/29/09
to

griwes

unread,
Dec 29, 2009, 6:46:27 AM12/29/09
to
TY ;)

Stefan Behnel

unread,
Dec 29, 2009, 8:51:59 AM12/29/09
to
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

griwes

unread,
Dec 29, 2009, 1:50:47 PM12/29/09
to
Great thanks ;) I will try to combine cython and embedding python
interpreter soon.

bobicanprogram

unread,
Jan 1, 2010, 7:39:47 AM1/1/10
to


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

0 new messages