Displaying 1 result from an estimated 1 matches for "ss_max".
Did you mean:
sp_max
2006 Sep 13
1
[Fwd: Re: [Swig-user] wrapping enums for python]
...1fdb79@mail.gmail.com>
Am 13.09.2006, 15:32 Uhr, schrieb K M <intra611@gmail.com>:
> Hi,
>
> When printing enum wrapped to python I would like to get symbol instead
> of
> number. For example
>
> in C++:
>
> enum min_max
> {
> SS_MIN = 0,
> SS_MAX = 100
> };
>
>
> I get:
>
> print swigtest.SS_MAX
> 100
>
> and I would like to get:
>
> print swigtest.SS_MAX
> SS_MAX
>
> So the idea was to use something like:
>
> %pythoncode %{
>
> class Enum(int):
> def __new__(cls, arg, desc ):
>...