Re: Calling a python function from C++.
In gmane.comp.python.c++, you wrote:
I'm using boost 1_31_0 on Mandrake 10.0 Linux.
I've created a simple demonstration of calling a python function with C++ object args using python.boost. It currently works with one exception. In the face of a missing python script, it "aborts" instead of properly throwing an exception if I use the "handle<>" machinery that boost.python offers. The following code fragment contains the working code with the stuff that should do the equivalent, but exibits this problem, commented out.
Hi Jeff,
I'd be interested to see your code. I am trying (not very successfully so far) to figure out this stuff myself, and any working examples are helpful. It sounds like you have a better handle on this stuff (no pun intended) than I do. :-)
Please email it to the my email address shown above. Thanks.
Faheem.
A while back I posted some example code for embedding python and have python 'scripts' manipulate C++ objects. It might also be of interest: http://mail.python.org/pipermail/c++-sig/2002-December/002833.html -- Thor Arne Johansen Dept. Manager R&D Ibas AS
participants (1)
-
thor.arne.johansen@ibas.no