I'm creating a python script to automate dd for my raid disk. After dd is complete, i would like to perform other tasks. May i know how can i verify the statues of the dd progress using python?
os.system('sudo losetup -D -v');
os.system('sudo losetup -o 1048576 -f xxx.img');
os.system('sudo losetup -o 1048576 -f xxx.img');
os.system('sudo mdadm --assemble --verbose --force /dev/md0 /dev/loop0 /dev/loop1');
os.system('dd if=/dev/md0 of=/desktop');
(perform other task once dd is complete)