May-30-2018, 10:09 PM
I am so used to use the './' that I do not even notice I was using it...
In unix-like systems the current directory is never in the search path except if you add it to your environment with PATH="${PATH}:." (please, never, ever do this) so you need to add the './' to the script name.
In windows the default behaviour was like having the PATH=".:${PATH}" declared so local versions of program and dll have priority over the system ones. I do not have now any windows machine to test if subprocess.Popen also follows this rule or not.
I guess that Popen just let the OS to look for the executable and in Windows it shall work without the './' in the command, but in any case this is something to check for scripts that shall work in different SO.
In unix-like systems the current directory is never in the search path except if you add it to your environment with PATH="${PATH}:." (please, never, ever do this) so you need to add the './' to the script name.
In windows the default behaviour was like having the PATH=".:${PATH}" declared so local versions of program and dll have priority over the system ones. I do not have now any windows machine to test if subprocess.Popen also follows this rule or not.
I guess that Popen just let the OS to look for the executable and in Windows it shall work without the './' in the command, but in any case this is something to check for scripts that shall work in different SO.