title: Controlling rsync with Python?
body: <p>I've been wanting to write a python script that would run several instances of rsync in sequence for backing up data to a different computer.</p>
  
  <p>At the moment I just have this text file with the commands I use and I've just been copy-pasting them into the terminal, and it seems kinda silly.</p>
  
  <p>I want to be able to use python to do this for me.  I know very vaguely how to use subprocess.popen, but I have no clue how to get python to interact with rsync directly, like for entering my password for me.  Can python do that?</p>
  
  <p>Something like:</p>
  
  <pre><code>if theProccess.proccessResponse == "Password:" :
      theProccess.respond(string)
  </code></pre>
  
  <p>Or is the best that I can do is just have it, or even a bash script, just run the rsyncs in sequence and have to type my password in over and over again?</p>
  
  <p>Thanks in advance.</p>