Basic Boost.Python Question

H

Hoop

Hi,

I have been working in getting Boost.Python running on my PC, seems to
work now.
I have what I believe is somewhat of basic question here.
I am starting on an application that will developed in VS2005, probably
using C++/CLI.
I want to be able to exchange data in between Python and C++. The user
when running the C++ app will be able to call a python script, set
some values, that will then be communicated to running application, it
will have to run the python code, and send some data to the
applicationfrom Python to vary the performance. And probably the C++
end will have to call a python script and pass some data to it.
So, is Boost.Python the way to go here or is there something else that
will accomplish this?

Thanks for your help
Jeff
 
P

Pierre Barbier de Reuille

Hoop said:
Hi,

I have been working in getting Boost.Python running on my PC, seems to
work now.
I have what I believe is somewhat of basic question here.
I am starting on an application that will developed in VS2005, probably
using C++/CLI.
I want to be able to exchange data in between Python and C++. The user
when running the C++ app will be able to call a python script, set
some values, that will then be communicated to running application, it
will have to run the python code, and send some data to the
applicationfrom Python to vary the performance. And probably the C++
end will have to call a python script and pass some data to it.
So, is Boost.Python the way to go here or is there something else that
will accomplish this?

Boost.Python is certainly a (good) way to do it ! I go as far as
including a Python shell to allow two-way interactions with the objects
loaded in the C++ GUI of my app ... Look at the tutorial, mostly here:

http://www.boost.org/libs/python/doc/tutorial/doc/html/python/embedding.html

To know how to use Python from a C++ application. But I warn you: it is
much simpler the other way around, i.e. having a Python app' calling
some C++ code to make some parts quicker (or call already existing libs).

Pierre
 
N

Neil Hodgson

Hoop:
I am starting on an application that will developed in VS2005, probably
using C++/CLI.

I haven't heard any reports of Boost.Python code being compatible
with C++/CLI so you may need to add an adaptation layer. To run inside
..NET, I'd choose IronPython.

Neil
 
H

Hoop

Hi Neil,
I have never heard of IronPython. Do you know if you can embedd the
Python interpreter ?
Thanks
Jeff
 
N

Neil Hodgson

Hoop:
I have never heard of IronPython. Do you know if you can embedd the
Python interpreter ?

I think so as I've read of people embedding the console on the
mailing list. My experience is in using a C# library within a Python
application.

Neil
 

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

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,478
Latest member
ReginaldVi

Latest Threads

Top