[issue35154] subprocess.list2cmdline() does not allow running some commands.

2018-11-05 Thread Roffild
Roffild added the comment: Yes, my mistake. 3.6/Lib/subprocess.py:970 -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue35154] subprocess.list2cmdline() does not allow running some commands.

2018-11-04 Thread Eryk Sun
Eryk Sun added the comment: > he himself puts double quotes or calls CommandLineToArgvW CommandLineToArgvW has nothing to do with creating a command line for use with CreateProcess. It's used by a process to parse its own command line using the common VC++ rules. > subprocess.list2cmdline()

[issue35154] subprocess.list2cmdline() does not allow running some commands.

2018-11-04 Thread Roffild
Roffild added the comment: Yes, the string with spaces must be enclosed in double quotes. But when a programmer calls CreateProcess(), he himself puts double quotes or calls CommandLineToArgvW(). subprocess.list2cmdline() is always called and can spoil the launch string. I propose to add an

[issue35154] subprocess.list2cmdline() does not allow running some commands.

2018-11-03 Thread Eryk Sun
Eryk Sun added the comment: In case you don't know, on Windows an args sequence has to be converted to a command line that's compatible with CreateProcess[AsUser]. If the executable path isn't passed separately, the system has to parse it from the command line, and in this case paths with sp

[issue35154] subprocess.list2cmdline() does not allow running some commands.

2018-11-03 Thread Roffild
New submission from Roffild : This issue has already been discussed in #23862 Have to use this hack: import subprocess def list2cmdlineHack(seq): return " ".join(seq) subprocess.list2cmdline = list2cmdlineHack There must be an argument in subprocess.run() to disable subprocess.list2cmd