[issue15533] subprocess.Popen(cwd) documentation: Posix vs Windows

Gregory P. Smith report at bugs.python.org
Tue Mar 16 21:56:51 EDT 2021


Gregory P. Smith <greg at krypto.org> added the comment:

For our subprocess docs, Eryk's text:

"""
For POSIX, ``executable`` should be stated as a "relative path without a slash in it" or a "relative path without a directory in it". An unqualified filename is a relative path that won't be resolved against ``cwd``, unless there's a "." entry in PATH.

For Windows, the use of CreateProcess() is documented. It could be stated more explicitly that ``executable``, ``args`` / ``list2cmdline(args)``, ``env``, and ``cwd`` are passed directly to CreateProcess() as lpApplicationName, lpCommandLine, lpEnvironment, and lpCurrentDirectory.
"""

is quite reasonable.  I wouldn't include your long notes.  But a link to a MSDN article explaining that would be useful at the end of the Windows paragraph.

For the POSIX case we should describe which PATH is used.  The current one, or the one set in a ``env`` dict.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15533>
_______________________________________


More information about the Python-bugs-list mailing list