I have a python script which requires a value from a shell script.
Following is the shell script (a.sh):
#!/bin/bash
return_value(){
value=$(///some unix command)
echo "$value"
}
return_value
Following is the python script:
Import subprocess
answer = Subprocess.call([‘./a.sh’])
print("the answer is %s % answer")
But its not working.The error is:
ImportError : No module named subprocess
I guess my verison (Python 2.3.4) is pretty old. Is there any substitute for subprocess
that can be applied in this case??