Eryk Sun <eryk...@gmail.com> added the comment:

> Also, why would we document the Windows rules, but not the POSIX 
> rules? They are arguably just as strange to someone who doesn't 
> know them.

POSIX rules are simply to search PATH for the filename as passed, and if it has 
a slash in it, the path is resolved against the working directory. There is no 
implicit search of the application directory, current directory, and system 
directories. There is no search for "dir/file" in *every* search path directory 
instead of just resolving against the working directory. There is no figuring 
out when ".exe" or PATHEXT extensions will be appended or how to search for a 
filename that has no extension by appending a trailing "." to the name. And 
there is no massive inconsistency between the search semantics of shell=True 
and shell=False. What happens with "platform semantics" in Windows is 
complicated compared to POSIX. I'm more comfortable telling people to search 
via shutil.which() than relying on the platform search. I'd be much more 
comfortable if that's what subprocess.Popen() just did on its own. But we're 
locked into platform semantics, and I don't see that changing.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42041>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to