title: Alternative in python to subprocess
body: <p>I am trying to write a script which has to make a lot of calls to some bash commands, parse and process the outputs and finally give some output.</p>
  
  <p>I was using subprocess.Popen and subprocess.call</p>
  
  <p>If I understand correct these methods spawn a bah process, run the command, get the output and then kill the process.</p>
  
  <p>Is there a way to have a bash process running in the background continuously and then the python calls could just go directly to that process? This would be something like bash running as a server and python calls going to it.</p>
  
  <p>I feel this would optimize the calls a bit as there is no bash process setup and teardown. Or will it give no performance advantage?</p>