[docs] [issue20927] Different behaviour on Posix and Windows when using subprocess.Popen(..., cwd=path)

Eric V. Smith report at bugs.python.org
Sat Mar 15 12:52:16 CET 2014


Eric V. Smith added the comment:

In the first example, you switch from "./app" to "app.exe" when using shell=True.

What happens to any of your examples if you add ".exe" without shell=True?

Popen eventually calls CreateProcess on Windows. From: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx, describing the lpApplicationName  parameter: "This parameter must include the file name extension; no default extension is assumed."

Running the shell though, you don't need the extension.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20927>
_______________________________________


More information about the docs mailing list