I need to run different *.exe files in parallel in python 2.7. These *.exe files were created using the C++ language. Also, I need that the cmd window opens for each *.exe file called.
I've already tried something of multiprocessing library, but it didn't work. Anything happened and the PC crashed...
import os
import subprocess
cwd = os.getcwd()
cmd_MakeBackgroundImage = cwd+"\\MakeBackgroundImage.exe"
cmd_SFVTest = cwd + "\\SFVTest.exe"
cmd_Wavelet_x = cwd + "\\Wavelet_x.exe"
cmd_Dataform_x = cwd + "\\Dataform_x.exe"
cmd_Wavelet_y = cwd + "\\Wavelet_y.exe"
cmd_Dataform_y = cwd + "\\Dataform_y.exe"
process_1 = os.system(cmd_MakeBackgroundImage)
process_2 = os.system(cmd_SFVTest)
#I need to run "cmd_Wavelet_x" at the same time of "cmd_Wavelet_y"
#So I need to parallelize process_3 and process_4
process_3 = os.system(cmd_Wavelet_x)
process_4 = os.system(cmd_Wavelet_y)
#I need to run "cmd_Dataform_x" at the same time of "cmd_Dataform_y"
#So I need to parallelize process_5 and process_6
process_5 = os.system(cmd_Dataform_x)
process_6 = os.system(cmd_Dataform_y)
I have an intermediate knowledge of python and I don't know anything about parallelization in Python.
The code that I described does exactly that I need but in a sequential way. The parallelization that I described will decrease the code runtime in about 1h.
It is very important that the cmd window opens for each *.exe, because these cmd windows indicate the status of the code running...
Thank You!