How to show and parse rsync progress in Python/Django?

S

sachit.technerves

I am using the development version of rsync with --info-progress option. I am writing a python program which transfer files from server to local computer using rsync:
finalresult = subprocess.Popen(['sshpass', '-p', password, 'rsync', '-avz', '--info=progress2', 'hostname:/filename', '/home/nfs/django/user'],
stdout=subprocess.PIPE).communicate()[0]

This should store the processing in the finalresult which is not happening. I just want to show the file syncing progress in my front-end Django app. How can I do that? Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top