Steve Dower <steve.do...@python.org> added the comment:
Thanks for confirming that reality aligns with the documentation. > when doing the same and passing `shell=True` to the POpen() call, there is no > such initial folder in the lookup Correct, because a fully qualified path to cmd.exe is used, and cmd.exe's application folder is not Python's. Ultimately, the above behaviour could have occurred anyway, so all that has really happened is that it is now more obvious. This is what always happens when you include support for other platforms - you find out which of your previous assumptions were incorrect (same principle applies to all of life if you think about it). If someone wants to update subprocess to manually search PATH when just provided with a filename, I'm okay with that. It would be a new enhancement though. For earlier versions, updating the docs to clarify that subprocess does not do a PATH search but relies on operating system behaviour for relative paths is probably the most helpful way to raise awareness. ---------- components: -Library (Lib) versions: +Python 3.10 -Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38905> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com