Subprocess.call does not work!

FYI, since backslash (\) is an escape character in Python, you cannot simply use it in a string literal in Python.

The easiest is to indicate that you specify a raw string by prepending an r character before the string. This is correct:

somePath = r"F:\someFolder\python.exe"

If you need to use a regular string then backslash can be entered by typing double-backslash. This is correct:

somePath = "F:\\someFolder\\python.exe"

You may also use Unix-type separators. This is correct:

somePath = "F:/someFolder/python.exe"
1 Like