this is my code but it doesn't works. dd command is executed, but no output is printed out. Note: if I change the stdout to a regular text file, the dd output is progressively saved in the file at every progress line that dd prints out.
Ideas? Regards.
import sys
from subprocess import Popen, STDOUT, PIPE
with Popen(["dd", "if=/dev/cdrom", "of=/tmp/prova.iso", "bs=2048", "count=499472", "status=progress"], stderr=STDOUT, stdout=PIPE) as proc:
print("ok")
print(proc.stdout.read())