Gennadiy Rozental wrote:
Hi,

Let's say I have string literal as static C++ class member:

string Foo::abc = "ABC";

I'm exporting the class Foo. I'd like to export Foo::abc as well and be able to
access it on Python side using similar interface: Foo.abc.

Can I do this using Boost.Python?


Sure, you just pass a pointer/ref to the static to def_readonly().  See the 
data_members test.

-t


_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to