Re: [C++-sig] Wanted: Examples of boost.python embedded usage

2010-07-20 Thread David Aldrich
Hi Phil, Thanks, I will take a look. Best regards David From: cplusplus-sig-bounces+david.aldrich=eu.nec@python.org [mailto:cplusplus-sig-bounces+david.aldrich=eu.nec@python.org] On Behalf Of Philip Jonientz - NEXPLORE AG Sent: 20 July 2010 12:41 To: Development of Python/C++ integra

Re: [C++-sig] Wanted: Examples of boost.python embedded usage

2010-07-20 Thread Philip Jonientz - NEXPLORE AG
Hi there http://ironalbatross.net/wiki/index.php5/CPP_BOOST_STACKLESS_PYTHON This one is actually with stackless python, but he's using the same boost.python you would use with standart cpython. If you skip the whole setting up part for linux there are some samples on how to create function wrap

Re: [C++-sig] Pickle python subclass of C++ interface

2010-07-20 Thread John Reid
Hans Meine wrote: On Sunday 18 July 2010 11:16:29 John Reid wrote: I'm not sure what you mean by mix-in, but my first attempt involved defining pickle suite getstate() and setstate() methods. I did not define a getinitargs() method. Unfortunately when the derived object was unpickled, __init__ w

[C++-sig] Wanted: Examples of boost.python embedded usage

2010-07-20 Thread David Aldrich
Hi I am new to boost.python ( and to Python ) and need to demonstrate embedding Python code in a C++ application. I would like to pass data to a Python function from C++ and retrieve the result. Please can anyone suggest a tutorial that would show me how to do this please? Best regards David

Re: [C++-sig] reuse C++ classes that have been wrapped with SWIG

2010-07-20 Thread Hans Meine
Hi Marco! On Tuesday 20 July 2010 09:31:48 Marco Selinger wrote: > Do you have some example, how this can be achieved? Do I need to do some > text processing or parsing of the swig output to find out which (un)wrap > functions to call? I have never worked on the internals of swig, so that I > woul

Re: [C++-sig] Pickle python subclass of C++ interface

2010-07-20 Thread Hans Meine
On Sunday 18 July 2010 11:16:29 John Reid wrote: > I'm not sure what you mean by mix-in, but my first attempt involved > defining pickle suite getstate() and setstate() methods. I did not > define a getinitargs() method. Unfortunately when the derived object was > unpickled, __init__ was called wit

Re: [C++-sig] reuse C++ classes that have been wrapped with SWIG

2010-07-20 Thread Marco Selinger
Dear Hans, your explanations are very helpful. Now it is obvious that I should not redeclare the opencv classes in boost.python after they have been wrapped with swig. But still I did not think about it in the right way. You write: >Instead, you *may* define a manual converter to make your lif