Hi Everyone:
I was trying to follow the example in 5.2.4 in the programming guide.
I entered the following in a cell in a SAGE notebook:
%pyrex
two = int(2)
def sumsquarepy(n):
return sum(i**two for i in xrange(1, n+1))
After evaluating that cell, I got the following error message:
Traceback (most recent call last): two = int(2)
File "/Applications/sage-2.7.1/local/lib/python2.5/site-packages/
sage/server/support.py", line 298, in sagex_import_all
create_local_c_file=create_local_c_file)
File "/Applications/sage-2.7.1/local/lib/python2.5/site-packages/
sage/server/support.py", line 279, in sagex_import
create_local_c_file=create_local_c_file)
File "/Applications/sage-2.7.1/local/lib/python2.5/site-packages/
sage/misc/sagex.py", line 219, in sagex
raise RuntimeError, "Error converting %s to C:\n%s\n%s"%(filename,
log, err)
RuntimeError: Error converting /Users/neal/sage_notebook/worksheets/
root/0/code/sage14.spyx to C:
Error converting Pyrex file to C:
------------------------------------------------------------
...
include "stdsage.pxi" # ctrl-c interrupt block support
include "cdefs.pxi"
two = int(2)
def sumsquarepy(n):
return sum(i**two for i in xrange(1, n+1)) ^
------------------------------------------------------------
/Users/neal/.sage/temp/OK-Computer.local/28019/spyx/
_Users_neal_sage_notebook_worksheets_root_0_code_sage14_spyx/
_Users_neal_sage_notebook_worksheets_root_0_code_sage14_spyx_0.pyx:
8:22: Expected ')'
The file that it's complaining about exists.
I really have no idea how to diagnose this problem, since I've only
just recently started playing with the notebook and pyrex. Any help
would be greatly appreciated!
Neal
--~--~---------~--~----~------------~-------~--~----~
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-forum
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---