473,416 Members | 1,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Basic Boost.Python Question

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

Aug 14 '06 #1
4 2129
Hoop wrote:
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...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
>
Thanks for your help
Jeff
Aug 14 '06 #2
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
Aug 14 '06 #3
Hi Neil,
I have never heard of IronPython. Do you know if you can embedd the
Python interpreter ?
Thanks
Jeff

Neil Hodgson wrote:
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
Aug 15 '06 #4
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
Aug 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roy Smith | last post by:
Up until recently, Python was the only language I'd ever seen that used the % operator for string replacement. Today, I was perusing the C++ Boost libraries, and discoverd that boost::format uses...
2
by: Stephen Horne | last post by:
I started making up a Python extension module to wrap a C++ library of mine using Boost Python. Trouble is, the library has a number of classes each of which has a lot of methods. I seem to have...
2
by: Steve Knight | last post by:
Hello, I'm new to Boost & Python and I'm diving straight in by trying to write an extension module to a third party library. Foolishness probably, but I don't have much choice! My question...
0
by: Gouda Man | last post by:
I'm planning to write a large program that will have advanced scripting in python in which the scripter will subclass c++ objects to add functionality. this leads me to boost.python (if you dont...
0
by: Li Daobing | last post by:
I can't use .def(str(self)) I write a simple example, without `str', I can build it well, but with this one, I can't build //Rational.cpp #include <boost/python.hpp> #include <iostream> ...
11
by: Osiris | last post by:
I have these pieces of C-code (NOT C++ !!) I want to call from Python. I found Boost. I have MS Visual Studio 2005 with C++. is this the idea: I write the following C source file:...
0
by: Osiris | last post by:
My experiences with BOOST on Windows XP and Visual C++ 2005 I'm new to Python. I built software in more than ten other computer languages. I'm not sure if that is not a handicap, when reading...
0
by: MarkE | last post by:
I'm just getting started on Boost Python and may have missed this obvious looking problem somewhere. Given a c-extension "testext" written using Boost Python containing a base class "Base", a...
0
by: devito | last post by:
hi there, for some days i try to build the boost.python tutorial "hello world" without bjam on winxp by using mingw. so i wrote a *.bat-file like the following: // --- snip...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.