I would also appreciate some clarification on this issue. I've written
a module which is not currently intended to be part of Sage (although
perhaps could be at some point).
In my .py files I have not imported from sage.all, but I've imported
the things I need, in the same way that the Sage
On Saturday, May 5, 2012 8:32:03 PM UTC+8, Emil wrote:
I would also appreciate some clarification on this issue. I've written
a module which is not currently intended to be part of Sage (although
perhaps could be at some point).
In my .py files I have not imported from sage.all, but
Hi,
the same rule applies for modules that are supposed to be included into
SAGE eventually?
So far I always included only the stuff I actually needed in the .py files.
@yogesh: Starting from SAGE 4.8 there is also a method called
import_statements which displays the module a certain function
thanks for your help.
On Wed, May 2, 2012 at 8:09 PM, mhs schraud...@math.uni-heidelberg.dewrote:
Hi,
the same rule applies for modules that are supposed to be included into
SAGE eventually?
So far I always included only the stuff I actually needed in the .py files.
@yogesh: Starting from
I tested by defining the function in the notebook and it worked. The
reason why it works in the notebook is because Sage preparses the input
that you provide it. By default it preparses x to make it a symbolic
variable. I am just surprised that var() does not work if you make your
function a
thanks for your help. your given method is perfectly working.
but now i have another problem.
i have another library which i want to add
def length(w,res,ll,ul,p):
from sage.symbolic.ring import SR
x,y=SR.var('x y')
z=solve(w,y)[0].right()
q=w.diff(x)
r=w.diff(y)
The problem you are running into is that when you are on the command
line, all the needed functions are loaded (this is a reason why the Sage
startup takes time). When you are writing your own library, you need to
import modules that you need.
You can do that by simply adding
from sage.all