Hay all
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

flor...@base:~/sage/sage-3.4$ ls
COPYING.txt  factor       install.log  README.txt
script.sage
data         factor~      ipython      sage                 spkg
devel        file.txt     local        sage-python          tmp
examples     HISTORY.txt  makefile     sage-README-osx.txt
flor...@base:~/sage/sage-3.4$

I am thankful for help... with best regards
florian

--~--~---------~--~----~------------~-------~--~----~
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