Cross-platform pcomb command-line processing

The variations across platforms you see is because pcomb itself does not process the quotes, relying instead on the OS and the C API to get the arguments. So arguments are processed in different ways. At the risk of providing too much information, here's a writeup of how and why.

On Unix, the OS passes pcomb a list of arguments without quotes and any substitutions done to pcomb, which never sees the quotes or substitutions at all. A Unix shell processes single and double quotes and does command-line substitutions.

On Windows a string is passed to the C library, which creates the list of arguments and then invokes pcomb. The C library only recognizes double quotes. The full arcane details of the Microsoft C library's argument processing are documented at I'm not sure what the GNU C library (mingw) does on Windows.

The Python "subprocess" module can be used in two different ways: to invoke pcomb directly (shell=False), in which case a sequence is preferred, and no processing is done on the sequence; "subprocess" makes every effort to see that that sequence becomes pcomb's argument list on all platforms. If, on the other hand, if shell=True is used, a string argument is preferred, and pcomb is invoked indirectly through a shell. My general preference is for shell=False, since one can get amazingly confusing results passing already-processed arguments through a shell, but there are some uses for shell=True.