On Fri, Jul 30, 2010 at 2:39 PM, Jeroen Demeyer <[email protected]> wrote:
> Hello sage-support,
>
> I have been breaking my head all evening around the file organisation
> and "import" model with Cython.  If there is any tutorial explaining
> this, I will gladly read it.
>
> Anyway, here is a concrete question:
>
> In file A.pyx, I have
> cdef MyClass myobj
> cdef class MyClass:
>    [...]
>
> In file A.pxd, I have
> cdef class MyClass:
>    [...]
>
> In file B.pyx, I would like to access "myobj" from A.pyx, but how?

You can't access cdef members of Cython modules from other modules
(yet). Here you'd probably want to make an accessors method in A.
Either that our you could not declare it as a MyClass (but in that
case it'd be just a normal Python object).

- Robert

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to