The docs for Popen mention that you can\'t specify your executable path relative to the \'change working directory\' kwarg.
If
cwdis not No
Yes, this is platform dependant.
On POSIX systems, the process is forked and in the child process a os.chdir(cwd) is executed before executing the executable.
On Windows however, the CreateProcess() API call is used and cwd is passed in as the lpCurrentDirectory parameter. No directory change takes place, and the CreateProcess() call does not consult that parameter when looking for the lpApplicationName to execute.
To keep your application cross-platform, you should not rely on the current working directory to be changed when looking up the executable.