Ask Your Question

Revision history [back]

Indeed you have to add

from sage.calculus.var import var

in calcul.py and do the same thing for any Sage name that appears in your module.To know the precise import statement to use, run import_statements in a Sage console:

sage: import_statements(var)
from sage.calculus.var import var
sage: import_statements(SR)
from sage.symbolic.ring import SR
sage: import_statements(pi)
from sage.symbolic.constants import pi