I'm working on an Cython extension module for Sage, but source code
introspection isn't working for me.
The extension is built from a single *.pyx file via the following
setup.py file:
-----setup.py-----
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
introtest = Extension(name = "introtest", sources = ["introtest.pyx"])
setup( name = "introtest", ext_modules = [introtest], cmdclass =
{'build_ext': build_ext})
------------------
and then installed with "sage -python setup.py install". However,
when I try
sage: introtest.intro??
Error getting source: arg is not a module, class, method, function,
traceback, frame, or code object
[..snip..]
Docstring [source file open failed]:
The contents of the *pyx file are below.
Thanks,
Nathan
----- introtest.pyx ----
def intro(int n):
cdef int i, a
a = 0
for i from 1 <= i <= n:
a += i*i
return a
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---