<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jan 7, 2018 at 8:17 AM, Christian Tismer <span dir="ltr"><<a href="mailto:tismer@stackless.com" target="_blank">tismer@stackless.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As a side note: In most cases where shell=True is found, people<br>
seem to need evaluation of the PATH variable. To my understanding,<br>
<br>
>>> from subprocess import call<br>
>>> call(("ls",))<br>
<br>
works in Linux, but (with dir) not in Windows. But that is misleading<br>
because "dir" is a builtin command but "ls" is not. The same holds for<br>
"del" (Windows) and "rm" (Linux).<br>
<br>
So I thought that using shell=True was a good Thing on windows,<br>
but actually it is the start of all evil.<br>
Using regular commands like "git" works fine on Windows and Linux<br>
without the shell=True parameter.<br>
<br>
Perhaps it would be a good thing to emulate the builtin programs<br>
in python by some shell=True replacement (emulate_shell=True?)<br>
to match the normal user expectations without using the shell?<br></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">That feels like a terrible idea to me. How do you define "normal user expectations" here? If people want shell builtins they should just use shell=True. (Also note IIUC there are several quite different shells commonly used on Windows, e.g. PowerShell.)<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>