title: python subprocess module to call shell (Bash) script
body: <p>I am trying to call a shell (Bash) script from python. The script is in my /home/user/bin directory with execute permission for group &amp; user, i.e., <code>-rwxr-xr--</code>. I am using <code>subprocess.check_call(["/home/user/bin/script.sh %s %s" % (subj,-6)],shell=True)</code> and this is generating an exit status 127 code. Adding <code>stderr=subprocess.STDOUT</code> to the command does nothing to elucidate. Here is the exact output: </p>
  
  <blockquote>
    <p>CalledProcessError: Command
    '['/home/.../bin/MNE_setup_source_space.sh kubi_td104 -6']' 
    returned non-zero exit status 127`</p>
  </blockquote>
  
  <p>I believe this might be a PATH related issue, is that correct? I don't know how to resolve this. If I am already passing in the absolute path to the executable how can there be a PATH issue?</p>
  
  <p>Thanks in advance</p>