[Tutor] Calling Static method ?
Sebastien Auclair
sxa@fluent.com
Mon Dec 30 13:25:02 2002
Hi !
We are extending python with a C++ class of our own.
That class holds a static function that we need to access from python.
Our problem is that we can't find a way to call that function without having
python trying to instantiate that class (Its a singleton, no constructors
are declared in the sip bindings).
We want to use that function like A::func() instead of A.func();
C++ >>>
class A {
public :
A& void func();
};
<<<
PYTHON>>>
import given_module
...
given_module.A.func()
<<<
Thanks !