title: Preserving bash redirection in a python subprocess
body: <p>To begin with, I am only allowed to use python 2.4.4</p>
  
  <p>I need to write a process controller in python which launches and various subprocesses monitors how they affect the environment.  Each of these subprocesses are themselves python scripts. </p>
  
  <p>When executed from the unix shell, the command lines look something like this:</p>
  
  <p>python myscript arg1 arg2 arg3 >output.log 2>err.log &amp;</p>
  
  <p>I am not interested in the input or the output, python does not need to process. The python program only needs to know 
  1) The pid of each process
  2) Whether each process is running. </p>
  
  <p>And the processes run continuously.  </p>
  
  <p>I have tried reading in the output and just sending it out a file again but then I run into issues with readline not being asynchronous, for which there are several answers many of them very complex. </p>
  
  <p>How can I a formulate a python subprocess call that preserves the bash redirection operations?</p>
  
  <p>Thanks</p>