title: python: os.spawn . cannot start bash process on background
body: <p>Task is to execute bash script from python script and let it execute on background, even if python script will finish. I need UNIX solution and i do not care if it will be not working on Win.</p>
  
  <p>Python script :</p>
  
  <pre><code>#!/usr/bin/env python
  import os, commands
  command = '/usr/bin/ssh localhost "/home/gd/test/python/back.sh  "   '
  print os.spawnlp(os.P_NOWAIT,command)
  print "Python done"
  </code></pre>
  
  <p>/home/gd/test/python/back.sh  :</p>
  
  <pre><code>#!/usr/bin/bash
  
  /bin/echo "started"
  /bin/sleep 80
  /bin/echo "ended"
  </code></pre>
  
  <p>The issue is, when python script starts , i see PID of spawned process printed. But there is no process on background. When i use P_WAIT  i see exit code 127 which means that command not found in the path. But i already provided all paths that already possible?
  These scripts works perfectly with commands.getouput.  </p>