[Python-Dev] Testsuite fails on Windows if a space is in the path
"Martin v. Löwis"
martin at v.loewis.de
Mon Sep 18 16:29:32 CEST 2006
Tim Peters schrieb:
> These are the MS docs for cmd.exe's inscrutable quoting rules after /C:
> If /C or /K is specified, then the remainder of the command line after
> the switch is processed as a command line, where the following logic is
> used to process quote (") characters:
> 1. If all of the following conditions are met, then quote characters
> on the command line are preserved:
I couldn't make sense of the German translation; reading over the
English version several times, I think I now understand what it does
(not that I truly understand *why* it does that, probably because too
many people complained that it would strip off quotes when the
program name had a space in it).
> I personally wouldn't change anything here for 2.5. It's a minefield,
> and people who care a lot already have their own workarounds in place,
> which we'd risk breaking. It remains a minefield for newbies, but
> we're really just passing on cmd.exe's behaviors.
So what do you suggest for 2.6? "Fix" it (i.e. make sure that the
target process is invoked with the same command line that is
passed to popen)? Or leave it as-is, just documenting the limitations
better. It's non-obvious that popen uses %COMSPEC% /c.
(Another problem is that the error message from cmd.exe gets discarded;
that should get fixed regardless)
> People are well-advised to accept the installer's default directory.
That's very true, but difficult to communicate. Too many people actually
complain about that, and some even bring reasonable arguments (such
as the ACL in c:\ being too permissive for a software installation).
More information about the Python-Dev