Python Subprocess.Popen from a thread

I’m trying to launch an ‘rsync’ using subprocess module and Popen inside of a thread. After I call the rsync I need to read the output as well. I’m using the communicate method to read the output. The code runs fine when I do not use a thread. It appears that when I use a thread it hangs on the communicate call. Another thing I’ve noticed is that when I set shell=False I get nothing back from the communicate when running in a thread.

Smarter filetransfers than rsync?

Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a
remote rsync daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the
set of files to be copied. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only
the differences between the source files and the existing files in the destination.