May-31-2019, 11:18 PM
Backslashes in strings indicate special characters, so your string does not contain the characters you think it does. There are a few ways to solve this:
subprocess.call([r"C:\Program Files\Editor\Editor.exe", "C:\Downloads\123.pdf"]) # raw string subprocess.call(["C:\\Program Files\\Editor\\Editor.exe", "C:\\Downloads\\123.pdf"]) # escape the backslashes subprocess.call(["C:/Program Files/Editor/Editor.exe", "C:/Downloads/123.pdf"]) # forward slashesForward slashes will work because they work in file paths regardless of the OS.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures