I'm am making a DVD ripping script and need to run commands synchronously for my script to work properly. I have been trying to using subprocess with no success. This test code should run for at least 7 seconds.
import subprocess
import time
start_time = time.time()
p1 = subprocess.Popen(['timeout', "2"], shell=False,
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
p2 = subprocess.Popen(['timeout', "5"], shell=False,
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
print(f"Finshed in {time.time() - start_time} Seconds")