On Thu, 18 Feb 2010 at 02:45PM -0800, LouP wrote: > I can run my python scripts using the SAGE python using the > recommended she-bang > > #!/usr/bin/env sage -python > > as the first line. But if the path to the script has white space or > non-ascii characters I get an error message like, > > .... > /Applications/sage-4.3.2/local/bin/sage-sage: line 876: [: too many > arguments > /Applications/sage-4.3.2/local/bin/sage-sage: line 882: [: too many > arguments > /Applications/sage-4.3.2/local/bin/sage-sage: line 888: [: too many > arguments > /Applications/sage-4.3.2/local/bin/sage-sage: line 892: [: too many > arguments > python: can't open file '/Users/loupecora/Nonlinear': [Errno 2] No > such file or directory
There are a number of shell scripts that get called this way: sage-whatever $1 and the shell does word splitting on the name of your file. That's why it is complaining about "too many arguments". To fix this, we need to go through the various scripts and put the right quotes around the $1 bits. I worked on this recently and managed to make some progress. I'll open a ticket and post a patch there. Dan -- --- Dan Drake ----- http://mathsci.kaist.ac.kr/~drake -------
signature.asc
Description: Digital signature
