Suppose I have a file ----------  

test.sage
-------------------------
from sage.all import *
print sys.argv[1], sys.argv[2], sys.argv[3]


It could be run from bash terminal as-------------- $  test.sage 2 3 5
Here 2, 3, 5 are the three command line arguments and can be printed by:

             print sys.argv[1], sys.argv[2], sys.argv[3]

But it gives error when loaded in sage environment:-------------------  
                   sage: load "test.sage 2 3 5"
             or   sage: load "test.sage 2 3 5"
             or   sage: load "test.sage" 2 3 5
             or   sage: load("test.sage",2,3,5)

but the statement-------------  print sys.argv[0]               
successfully prints the file name. 
So I think it can be done.
It will be very helpful if someone posts a way out.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to