How to converter std::string* in boost.python?
Question: How to converter std::string* in boost.python?I have to handle some data of
c++ in python.The data may be big.So I return a pointer to python. But there
are some errors.

# c++

    
    
    #include <boost/python.hpp>
    #include <string>
    
    class A {
    public:
        A() {
            data="342342fgsf";
            ss=&data;
        }
        std::string *ss;
        std::string data;
    };
    
    BOOST_PYTHON_MODULE(ctopy)
    {
        using namespace boost::python;
        class_<A> ("A",init<>())
            .add_property(ss,&A::ss)
        ;
    }
    

# python

    
    
    import ctopy
    t1=ctopy.A()
    print t1.ss     #error.TypeError:No to_python (by-value) converter found for c++ type:std::string*
    


Answer: You can't just pass pointer. Use `pointer_wrapper`:
<http://www.boost.org/doc/libs/1_53_0/libs/python/doc/v2/ptr.html>

