threading.Thread.__init__(self)

def run(self):
    p = subprocess.Popen('rsync -av /etc/passwd /tmp'.split(), shell=False,
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
self.stdout, self.stderr = p.communicate()
myclass = MyClass()
myclass.start()
myclass.join()
print(myclass.stdout)
Python Subprocess.Popen from a thread