Reading the response from rsync with python and popen3
Posted on 2010-01-04
I asked a similar question involving wget before and so have made this a related question.
I am using rsync with ssh to sync a local folder with a file from a server. My rsync query is fairly basic accept for adding the stats and progress commands to give me more information
my statement is something along the lines of:
rsync -avz --progress --stats ssh remoteuser@remotehost:/remote/dir /local/dir/
I am using ssh certificates on the server and the client so there is no need to enter a password or for any other user interaction
What I now want to do is to call my rsync query and parse the results as in the wget example, but my problem is that i am getting completely baffled as to how to put together the regular expressions (re) in python that will allow me to read the response and tell when the process is complete.