search for: _swigtest

Displaying 1 result from an estimated 1 matches for "_swigtest".

2006 Sep 13
1
[Fwd: Re: [Swig-user] wrapping enums for python]
...> class Enum(int): > def __new__(cls, arg, desc ): > self = int.__new__(cls, arg) > self.desc = desc > return self > def __repr__( self ): > return self.desc > > %} > > and then somehow in the .py file > > SS_MIN = Enum(_swigtest.SS_MIN, "SS_MIN") > instead of > SS_MIN = _swigtest.SS_MIN > > But the problem is that I do not know how to do > SS_MIN = Enum(_swigtest.SS_MIN, "SS_MIN") > for each define (would it be possible to use something like > %feature("pythonprepend")?) ....