[C++-sig] singleton wrapping

Roman Yakovenko roman.yakovenko at gmail.com
Mon Apr 24 10:17:45 CEST 2006


On 4/24/06, Libor Capak <capak at inputwish.com> wrote:
> hello,
> ...

> is there any trick how to skip writing class A_wrap and still
> use method A::foo() as staticmethod from python?

I think next link can help you:
http://boost.org/libs/python/doc/v2/scope.html#scope-spec

And next line can do the trick, but I am not sure

scope().attr("A_singleton") = &A::instance();



> Libor Capak


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list