Hi, Using sage-2.9.3, on Debian Etch on a core duo machine. According to the sage tutorial p.67 section 5.3 Standalone Python/Sage Scripts, i tried to run such a script called BMV.sage:
#!/usr/bin/env sage -python import sys $ ./BMV.sage /usr/bin/env: sage -python: file or directory not found though $ /usr/bin/env sage -python brings me to the python command line, i.e. this works. changing the file BMV.sage to: #!/path/to/sage/sage -python import sys shows strange behaviour: if i run this script, nothing happens, just the mouse pointer changes (into a cross), clicking the mouse button (left or right) brings back the shell command line prompt, no output at all...., and the mouse pointer turns to normal again... runnin the script: #!/path/to/sage/sage -python a = "Hello" outputs ./BMV.sage: line 2: a: command not found the script from the tutorial, literally: #!/home/georg/Daten/.System/bin/sage/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]) gives the following output, as above not before clicking one of the mouse buttons: $ ./BMV.sage from: can't read /var/mail/sage.all ./BMV.sage: line 4: syntax error near unexpected token `sys.argv' ./BMV.sage: line 4: `if len(sys.argv) != 2:' additionally there is a file called 'sys' created in the directory of BMV.sage, this is to long to post it here, the beginning is %!PS-Adobe-3.0 %%Creator: (ImageMagick) %%Title: (sys) %%CreationDate: (Tue Jan 15 18:43:48 2008) %%BoundingBox: 0 0 897 433 %%HiResBoundingBox: 0 0 897 433 %%DocumentData: Clean7Bit %%LanguageLevel: 1 %%Orientation: Portrait %%PageOrder: Ascend %%Pages: 1 %%EndComments ..... thanks for help, Georg --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com 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/ -~----------~----~----~----~------~----~------~--~---