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.