[Cython] Distutils and pxd files
Robert Bradshaw
robertwb at math.washington.edu
Mon Jan 19 19:51:42 CET 2009
On Jan 18, 2009, at 6:00 AM, Ewald R. de Wit wrote:
> I have a problem using the example from
> http://docs.cython.org/docs/sharing_declarations.html#sharing-
> extension-types
>
> I'm compiling it with the setup.py file from below, with the command
> python setup.py build_ext --inplace
>
> When I run it I get the following error:
>
> $ python -c 'import Landscaping'
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "Landscaping.pyx", line 6, in Landscaping (Landscaping.c:347)
> print "Shrubbery size is %d x %d" % (sh.width, sh.height)
> AttributeError: 'Shrubbing.Shrubbery' object has no attribute 'height'
>
> It looks like the Shrubbing.pxd file, where the hight and width
> attributes are
> defined, is ignored. How can I fix this?
Did you declare sh to be of type Shrubbery?
- Robert
>
More information about the Cython-dev
mailing list