from subprocess import Popen, PIPE
dd_process = Popen(['dd', 'if=/dev/sda'], stdout=PIPE)
ssh_process = Popen(['ssh', 'root@example.com', 'dd', 'of=/dev/sda'], stdin
    =dd_process.stdout, stdout=PIPE)
dd_process.stdout.close()
out, err = ssh_process.communicate()
Вывод конвейера Python между двумя подпроцессами