Thanks very much for the explanation. Yes, I know of:
http://www.sagemath.org/doc/html/tut/node48.html#sec:standalone
But as Timothy said, I want to use it like this:
#!/usr/bin/env python
import sys
from sage.all import *
if len(sys.argv) != 2:
print "Usage: %s <n>"%sys.argv[0]
print "Outputs the prime factorization of n."
sys.exit(1)
print factor(sage_eval(sys.argv[1]))
Because I personally don't like the preparsing and also this way it is
more intuitive for me. I am looking forward to this feature. Because
being able to use in Debian:
apt-get install python-sage
and then just start regular python and
import sage
and I would have a fully functional environment, I think that would be
awesome. Are you considering getting it into Debian? I am not sure if
it is a problem, that the binary package will be like 100MB.
Ondrej
On Apr 29, 7:14 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On 4/29/07, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>
>
>
> > I would like to use SAGE from a normal python by using:
>
> > import sage
>
> > and playing with it. I know that I can use:
>
> > [EMAIL PROTECTED]:~/extprograms/sage-2.5.alpha0$ ./sage -python
> > example.sage
> > This is a simple SAGE example script.
> > 15
> > Traceback (most recent call last):
> > File "example.sage", line 26, in <module>
> > print factor(2005)
> > NameError: name 'factor' is not defined
>
> > But I prefer to have SAGE installed as a regular python package. Is it
> > possible?
>
> It is possible, but it is currently _not_ supported. It will be
> supported at some
> point in the future, but there are other things that are more important that
> have to be done first.
>
> You can often use everything installed in a different python from the
> "sage -python" by just appending to the python path from within
> Python.
>
> William
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---