Damon Atkins firstname.lastname@example.org added the comment:
I see from this. That this is still an issue https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1146
Is it not a solution to save current directory location chdir(cwd) before calling _winapi.CreateProcess() restore the original directory.
This will result in the cwd being searched for the executable, which most people would expect to happen. It seems CreateProcess does not change to cwd until after the file is checked for existence or loaded.
---------- nosy: +Damon Atkins