c/c++ and python

M

Mattia Adami

Hi to all!
I have a little problem. I want to develop an application in c/c++ that
creates a window with gtk+ accordinly to the information on a xml file.
The funcions that are called for manage the event should be written in
python. I don't know how to do it, can you help me? Is it possible?
Thanks a lot!
 
A

Alessandro Bottoni

Mattia said:
Hi to all!
I have a little problem. I want to develop an application in c/c++ that
creates a window with gtk+ accordinly to the information on a xml file.
The funcions that are called for manage the event should be written in
python. I don't know how to do it, can you help me? Is it possible?
Thanks a lot!

Yes, it is possible. Most likely, you will have to embed a Python
interpreter in your app. Have a look at the Extending&Embedding section of
the Python manual.

As an alternative, you can use your C++ code as an extension of Python (a
module). Again, have a look at the Extending&Embedding section of the
Python manual.

BTW: are you aware of the existence of PyGTK and wxPython?

HTH
 
M

Mattia Adami

Thanks a lot, very clear and usefull anser!

Yes, I know PyGTK and wxPython, but I want to develop a plugin for
another application that requires c++. I guess that embedding is the
appropriate way.

Thanks.
 

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
474,264
Messages
2,571,323
Members
48,006
Latest member
TerranceCo

Latest Threads

Top