Re: [C++-sig] how to deep copy boost python object

2009-05-05 Thread Gennadiy Rozental
Neal Becker gmail.com> writes: > > Gennadiy Rozental wrote: > > > This looks like trivial question from FAQ, but I can seem to fond the > > answer. > > > > Any pointers? > > > > Genandiy > > Maybe overide __copy__? How is it involved? Here is an example: bp::object o = foo(); // Here i w

Re: [C++-sig] Extended python system needs access to cPickle in c++

2009-05-05 Thread William Ladwig
You can import python modules in C++ using the import function. See here: http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/import.html You can also make your C++ extension classes 'pickleable' using boost python's pickle suite: http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/pic

Re: [C++-sig] how to deep copy boost python object

2009-05-05 Thread Neal Becker
Gennadiy Rozental wrote: > This looks like trivial question from FAQ, but I can seem to fond the > answer. > > Any pointers? > > Genandiy Maybe overide __copy__? ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/

Re: [C++-sig] Wrapping functions that return a raw pointer

2009-05-05 Thread hessiess
Thanks > take a look in this documentation about return police and > ResultConverterGenerator. > > > http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/reference.html#models_of_call_policies > > For this specific case you can use this one: > http://www.boost.org/doc/libs/1_39_0/libs/python/doc

[C++-sig] Extended python system needs access to cPickle in c++

2009-05-05 Thread Simon Pickles
Hi, I have an app with a python core, then c++ extension modules. I'd like to be able to use cPickle to pack structures, especially boost::python::tuples, in c++. Is there a way I can expose a python module in the c++ extensions? I thought about passing a module as an arg to a c++ function,

[C++-sig] how to deep copy boost python object

2009-05-05 Thread Gennadiy Rozental
This looks like trivial question from FAQ, but I can seem to fond the answer. Any pointers? Genandiy ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig