+ 2

Python pls šŸ˜

can python run .exe(Windows) files in Windows?

14th Jun 2018, 6:06 PM
Hakkim S
2 Answers
+ 1
You can also useĀ subprocess.call()Ā if you want. For example, import subprocess FNULL = open(os.devnull, 'w') #use this if you want to suppress output to stdout from the subprocess filename = "my_file.dat" args = "RegressionSystem.exe -config " + filename subprocess.call(args, stdout=FNULL, stderr=FNULL, shell=False) The difference betweenĀ callĀ andĀ PopenĀ is basically thatĀ callĀ is blocking whileĀ PopenĀ is not, withĀ PopenĀ providing more general functionality. UsuallyĀ callĀ is fine for most purposes, it is essentially a convenient form ofĀ Popen.Ā  https://www.quora.com/How-do-I-run-JUMP_LINK__&&__Python__&&__JUMP_LINK-files-from-the-windows-command-line https://stackoverflow.com/questions/15928956/how-to-run-an-exe-file-with-the-arguments-using-python
14th Jun 2018, 6:08 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 1
Alexander Sokolov Thanks buddy
15th Jun 2018, 6:40 PM
Hakkim S