I need to run subprocess commands in for loop parallelly without interrupting one another. I have more than 100 shell commands. Some run for a short period and some take time. I don't want to wait for long-running commands. Below are the example. "cmds" is a list of commands
for cmd in cmds:
push=subprocess.Popen(cmd, shell=True,stdout = subprocess.PIPE)
push.wait()
print(push.communicate()[0])