Re: [C++-sig] Details of Boost.Python Py_Finalize issue?

2009-08-04 Thread Ravi
On Sunday 02 August 2009 11:44:22 Haoyu Bai wrote: > So could anyone share your experience with this issue, provide some > test case or anymore information about this issue? I will try to solve > it. I haven't been able to spend any time on this. But the general approach I wanted to check is as f

Re: [C++-sig] boost::python::str and Python's str and unicode types

2009-08-04 Thread Haoyu Bai
On Tue, Aug 4, 2009 at 4:37 PM, Robert Smallshire wrote: > > > On Tue, Jul 28, 2009 at 10:11 PM, Robert > Smallshire wrote: > >> I have modified my local build of boost.python to include a >> boost::python::unicode class, together with appropriate conversions from >> wchar_t, const wchar_t* and std

Re: [C++-sig] Keyed properties?

2009-08-04 Thread Matthew Scouten (TT)
You can solve it pretty much the same way. Expose a function __*etitem__. It would look something like this: void set(thingy_t thingy&, int index, value_type& val){...} value_type get(const thingy_t thingy&, int index ){...} And then you export them in the class_ exposer: class_< thingy_t >("t

[C++-sig] Keyed properties?

2009-08-04 Thread Jakob van Santen
Hello, I'm in the process of hiding the unnecessarily verbose parts of a C++ interface behind Python properties, and I've run in to a slight problem. We have a bunch of classes that expose private std::vectors via Get(int index) and Set(int index, value_type& val) methods. Ideally, I'd li

Re: [C++-sig] boost::python::str and Python's str and unicode types

2009-08-04 Thread Robert Smallshire
On Tue, Jul 28, 2009 at 10:11 PM, Robert Smallshire wrote: > I have modified my local build of boost.python to include a > boost::python::unicode class, together with appropriate conversions from > wchar_t, const wchar_t* and std::wstring... During testing we have encountered issues with the di