[Cython] Test/example for cpdef enum

Ian Bell ian.h.bell at gmail.com
Tue Aug 5 18:15:44 CEST 2014


On Tue, Aug 5, 2014 at 1:48 AM, Robert Bradshaw <robertwb at gmail.com> wrote:

> On Mon, Aug 4, 2014 at 4:14 PM, Ian Bell <ian.h.bell at gmail.com> wrote:
> >
> > On Sat, Aug 2, 2014 at 7:08 PM, Robert Bradshaw <robertwb at gmail.com>
> wrote:
> >>
> >> On Sat, Aug 2, 2014 at 3:56 AM, Ian Bell <ian.h.bell at gmail.com> wrote:
> >> > Are there any tests/docs/examples showing how to use the cpdef enum?
> >> > This
> >> > is a feature I have been looking for for a long time and I am hoping
> to
> >> > use
> >> > it very soon in my own project.
> >>
> >> https://github.com/cython/cython/blob/master/tests/run/cpdef_enums.pyx
> >> https://github.com/cython/cython/blob/master/tests/run/cpdef_enums.pxd
> >
> >
> > I see.  Stupidly I had thought that it would be automatic in the sense
> that
> > you don't have to manually declare which parameters will be output in the
> > python module.  Evidently that is not the case, which I guess is ok.  I
> had
> > hoped to avoid my script which parses my header and make a constants
> module.
> > It works fine, its not the prettiest, but I guess I won't be saying
> goodbye
> > to it any time soon.
>
> Yeah, we don't have anything that looks at the actual .h/.c files yet.
>
Too bad - I guess that's why projects like xdress/SWIG exist - though for
the life of me I can't get xdress to work at all.  SWIG is great, but not
so much from the standpoint of interfacing with other cython code.

> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> https://mail.python.org/mailman/listinfo/cython-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20140805/a1823415/attachment.html>


More information about the cython-devel mailing list