In a folder, I have two files— a Python Script and an Executable application. What I want is to run the Executable app using the Python script. I used below pieces of code:
os.chdir("D:\\ToneFinder GIthub\\ToneFinder\\Record.exe") # NotADirectoryError: [WinError 267] The directory name is invalid: 'D:\\ToneFinder GIthub\\ToneFinder\\Record.exe'
os.system("D:\\ToneFinder GIthub\\ToneFinder\\Record.exe") # 'D:\ToneFinder' is not recognized as an #internal or external command,
operable program or batch file.
os.startfile("D:\\ToneFinder GIthub\\ToneFinder\\Record.exe") # Nothing happens
subprocess.call("D:\\ToneFinder GIthub\\ToneFinder\\Record.exe") #Error loading Python DLL 'D:\ToneFinder GIthub\ToneFinder\python310.dll'
Note: Always, the path is 100% correct
Any ideas on that? Thank you.