On 21 May 2009, at 02:22, flori wrote:

> I would like to write a script using sage and I just followed the
> tutorial page 82. I copied the example
>
> #!/usr/bin/env sage -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]))
>
> to a file which I named factor (without filetype!). I set the env.
> variable
>
> export SAGE_ROOT=/home/florian/sage/sage-3.4/
>
> and I tried to run the scripts as explained in the tutorial...
>
> ./factor 2006
>
> the result was
>
> flor...@base:~/sage/sage-3.4$ sudo ./factor 2006
> sudo: ./factor: command not found

Is the sage executable in your PATH?

--
Kevin Horton
Ottawa, Canada




--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to