I have Linux command that is running in Python.
roc = subprocess.Popen(['sshpass', '-p', password, 'rsync', '-avz', '--info=progress2', hostname, '/home/zurelsoft/test'],
stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0]
print roc
This print the command processing only when it finishes execution. But, I want the output of the command as it is happening and stops when the command is fully executed. How it can be done?