On Oct 6, 2008, at 12:35 PM, Kevin Ar18 wrote: > > >>> So what do you do with modules that mix Cython and Python? >> >> cdef classes live in both the C and Python namespace. cpdef functions >> are accessible from both C and Python as well. In this case, you >> probably need to just write >> >> a = 1 >> >> and deal with it being a Python object so you can get at it from >> Python (and it is still accessible from C). Everything accessible >> from Python is also accessible from Cython. >> >> We probably should support cimporting cdef'd global variables >> (probably with the same trick as we do for functions) and it would be >> nice to be able to declare variables as "public" or "readonly" as one >> can do with class attributes (though the only way I could see how to >> do it is the hack at http://mail.python.org/pipermail/python-list/ >> 2007-January/422578.html or making a subtype of the module type) > So I essentially need to merge several hundred lines of module code > into one file. :(
Probably not, that depends on what you're trying to do. Sage has hundreds of .pyx and .py files that all work with each other. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
