I am trying to run .exe files from the below locations
Code:
if __name__ == '__main__':
job1 = threading.Thread(target='C:\\Users\\XYZ\\PycharmProjects\\Task1\\dist\\Multiof2.exe')
job2 = threading.Thread(target='C:\\Users\\XYZ\\PycharmProjects\\Task2\\dist\\Multiof5.exe')
job1.start()
job2.start()
job1.join()
job2.join()
Error:
TypeError: 'str' object is not callable
I know that we can call .exe files using import subprocess
but subclass.call()
will start to execute only 1 file at a time, upon completion of First .exe file, it will start executing the Second .exe file. I need to run one or more .exe files at the same time and the .exe file which completes the execution First will prints(my .exe files will print after completion of its task).
multithread will support only callable functions or .exe files also?
If not support by multithread, then suggest to me how to run multiple .exe files.
I also tried import multiprocess
and used multiprocess.process()
to run .exe files but not worked.