sh: test: argument expected and os.environ II

Iván Cabria cabria at fta.uva.es
Tue Nov 9 19:23:57 EST 2004


Hi again,   
   
I have checked that the shell is the bash shell by running again    
the script with a print statement. The first four lines are:   
#!/usr/local/bin/python   
import os   
os.environ['SHELL'] = "/bin/bash"   
print os.environ['SHELL']   
   
I have also read in Internet, in the following message about a    
python script:   
http://www.dbforums.com/t549675.html   
that the functions that execute a shell command will always invoke the Bourne   
shell.   
  
The message error 'sh: test: argument expected' comes from the sentence:  
energy = atoms.GetPotentialEnergy()   
in the python script I am running. Could be that this sentence is always 
invoking somehow the Bourne shell?   
   
   
Iván





More information about the Python-list mailing list