Hi guys, Searching in karmic patch for python 2.6, I found this one which touch in __doc__ attributes of python objects. (http://pastebin.com/m4d8008fa). I did not test if removing this boost will works fine. For fix this I did a little change removing the use of def_readonly("bar",Foo::bar) to add_property("bar", setter_property_bar).
I will try find the problem in boost source but for now this change can solve the problem. BR Renato Araujo Oliveira Filho On Sun, Aug 30, 2009 at 4:40 AM, VáclavŠmilauer<eudo...@arcig.cz> wrote: > Such is the shortest example I am able to isolate (nothing py++ specific). > Should I report that as bug? Against boost::python? > > I hope some expert will be able to comment on that. > > ---- > > $ cat foo.cc > #include<boost/python.hpp> > struct Foo{ > static int bar; > }; > int Foo::bar=3; > > BOOST_PYTHON_MODULE(foo){ > boost::python::class_<Foo>("Foo",boost::python::init<>()) > .def_readonly("bar",Foo::bar); > } > > $ g++ -o foo.so -I/usr/include/python2.6 -fPIC -shared -lboost_python-mt > foo.cc > $ PYTHONPATH=. python -c 'import foo' > Traceback (most recent call last): > File "<string>", line 1, in <module> > AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' > is read-only > > > > _______________________________________________ > Cplusplus-sig mailing list > Cplusplus-sig@python.org > http://mail.python.org/mailman/listinfo/cplusplus-sig > _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig